Leaked source code of windows server 2003
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.

97 lines
2.9 KiB

  1. /* *************************************************************************
  2. ** INTEL Corporation Proprietary Information
  3. **
  4. ** This listing is supplied under the terms of a license
  5. ** agreement with INTEL Corporation and may not be copied
  6. ** nor disclosed except in accordance with the terms of
  7. ** that agreement.
  8. **
  9. ** Copyright (c) 1995 Intel Corporation.
  10. ** All Rights Reserved.
  11. **
  12. ** *************************************************************************
  13. */
  14. /***************************************************************************
  15. *
  16. * exutil.h
  17. *
  18. * Description
  19. * Shared encoder utility interface file
  20. */
  21. // $Header: S:\h26x\src\enc\exutil.h_v 1.1 29 Dec 1995 18:09:30 DBRUCKS $
  22. // $Log: S:\h26x\src\enc\exutil.h_v $
  23. ;//
  24. ;// Rev 1.1 29 Dec 1995 18:09:30 DBRUCKS
  25. ;//
  26. ;// add CLAMP_TO_N macro
  27. ;//
  28. ;// Rev 1.0 13 Dec 1995 14:00:50 DBRUCKS
  29. ;// Initial revision.
  30. #ifndef __EXUTIL_H__
  31. #define __EXUTIL_H__
  32. /*********************** Initialization functions **********************/
  33. typedef struct {
  34. } EncoderOptions;
  35. extern void GetEncoderOptions(EncoderOptions *);
  36. /****************************** TR functions ***************************/
  37. /* Increment the TR field using the specified frame rate with an
  38. * accumulated error. The first frame is assigned a value of 0.
  39. * If the increment were 1.5 then the values would be
  40. *
  41. * TR 0 1 3 4 6 ...
  42. * fTR_Error 0.0 0.5 0.0 0.5 0.0 ...
  43. */
  44. extern void Increment_TR_UsingFrameRate(
  45. U8 * pu8TR, /* Pointer to the TR variable */
  46. float * pfTR_Error, /* Pointer to a place to save the error */
  47. float fFrameRate, /* Frame rate - must be > 0.0 */
  48. int bFirstFrame, /* First frame flag */
  49. U8 u8TRMask); /* Mask to use */
  50. /* Increment the TR field using the specified temporal reference value.
  51. */
  52. extern void Increment_TR_UsingTemporalValue(
  53. U8 * pu8TR, /* Pointer to the TR variable */
  54. U8 * pu8LastTR, /* Pointer to the last TR variable - used in an ASSERT */
  55. long lTemporal, /* Temporal value - minimum of 8 bits of precision */
  56. int bFirstFrame, /* First frame flag */
  57. U8 u8TRMask); /* Mask to use */
  58. /**************************** Debug Functions **************************/
  59. /* Write the specified string to a trace file: "trace.txt".
  60. */
  61. #ifdef DEBUG_ENC
  62. extern void trace(
  63. char *str); /* String to output */
  64. #endif
  65. /* Convert the DCT coefficients to unbiased coefficients in the correct
  66. * order in DCTarray
  67. */
  68. #ifdef DEBUG_DCT
  69. void cnvt_fdct_output(
  70. unsigned short *DCTcoeff, /* Pointer to coefficients */
  71. int DCTarray[64], /* Output Array */
  72. int bIntraBlock); /* Intra block flag */
  73. #endif
  74. /***************************** Misc Functions **************************/
  75. #define CLAMP_N_TO(n,low,high) \
  76. { \
  77. if (n < low) \
  78. n = low; \
  79. else if (n > high) \
  80. n = high; \
  81. }
  82. #endif