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.

112 lines
3.4 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. // $Author: AGUPTA2 $
  15. // $Date: 08 Mar 1996 17:29:46 $
  16. // $Archive: S:\h26x\src\dec\d3mvdec.h_v $
  17. // $Header: S:\h26x\src\dec\d3mvdec.h_v 1.8 08 Mar 1996 17:29:46 AGUPTA2 $
  18. // $Log: S:\h26x\src\dec\d3mvdec.h_v $
  19. ;//
  20. ;// Rev 1.8 08 Mar 1996 17:29:46 AGUPTA2
  21. ;// Changed BlockCopy interface.
  22. ;//
  23. ;// Rev 1.7 18 Dec 1995 12:43:10 RMCKENZX
  24. ;// added copyright notice
  25. ;//
  26. ;// Rev 1.6 13 Dec 1995 11:00:22 RHAZRA
  27. ;// No change.
  28. ;//
  29. ;// Rev 1.5 11 Dec 1995 11:34:40 RHAZRA
  30. ;// No change.
  31. ;//
  32. ;// Rev 1.4 09 Dec 1995 17:30:58 RMCKENZX
  33. ;// Gutted and re-built file to support decoder re-architecture.
  34. ;// New modules are:
  35. ;// H263ComputeMotionVectors
  36. ;// H263DecodeMBHeader
  37. ;// H263DecodeIDCTCoeffs
  38. ;// This module now contains code to support the first pass of the decoder
  39. ;//
  40. ;// Rev 1.3 11 Oct 1995 13:26:04 CZHU
  41. ;// Added code to support PB frame
  42. ;//
  43. ;// Rev 1.2 03 Oct 1995 12:22:14 CZHU
  44. ;// Fixed bug found by Tom in GetVariableBits for Code 0xC0
  45. ;//
  46. ;// Rev 1.1 11 Sep 1995 17:21:34 CZHU
  47. ;// Changed the interface
  48. ;//
  49. ;// Rev 1.0 08 Sep 1995 11:46:02 CZHU
  50. ;// Initial revision.
  51. ///////////////////////////////////////////////////////////////////////////
  52. // d3mvdec.h
  53. //
  54. // Description:
  55. // Interface to motion vector decoding.
  56. //
  57. //
  58. #ifndef __D3MVD_H__
  59. #define __D3MVD_H__
  60. #define GET_VARIABLE_BITS_MV(uCount, fpu8, uWork, uBitsReady, uResult, uCode, uBitCount, fpMajorTable, fpMinorTable) { \
  61. while (uBitsReady < uCount) { \
  62. uWork <<= 8; \
  63. uBitsReady += 8; \
  64. uWork |= *fpu8++; \
  65. } \
  66. /* calculate how much to shift off */ \
  67. /* and get the code */ \
  68. uCode = uBitsReady - uCount; \
  69. uCode = (uWork >> uCode); \
  70. /* read the data */ \
  71. if (uCode >= 0xc0) \
  72. { uCode = uCode >> 5 ; \
  73. uResult = fpMajorTable[uCode]; \
  74. } \
  75. else \
  76. uResult = fpMinorTable[uCode]; \
  77. /* count of bits used */ \
  78. uBitCount = uResult & 0xFF; \
  79. /* bits remaining */ \
  80. uBitsReady = uBitsReady - uBitCount; \
  81. uWork &= GetBitsMask[uBitsReady]; \
  82. }
  83. extern I32 H263ComputeMotionVectors(
  84. T_H263DecoderCatalog FAR * DC,
  85. T_BlkAction FAR * fpBlockAction);
  86. extern I32 H263DecodeMBHeader(
  87. T_H263DecoderCatalog FAR * DC,
  88. BITSTREAM_STATE FAR * fpbsState,
  89. U32 **pN, // NEW
  90. T_MBInfo FAR * fpMBInfo); // PB-New
  91. extern I32 H263DecodeIDCTCoeffs(
  92. T_H263DecoderCatalog FAR * DC, // Old function munged
  93. T_BlkAction FAR * fpBlockAction,
  94. U32 uBlockNumber,
  95. BITSTREAM_STATE FAR * fpbsState,
  96. U8 FAR * fpu8MaxPtr,
  97. U32 **pN,
  98. T_IQ_INDEX **pRUN_INVERSE_Q); // NEW
  99. // extern void BlockCopy(U32 uDstBlock, U32 uSrcBlock);
  100. // select the medium value
  101. #define MEDIAN(x,y,z,a) {if (y < x) {a=y;y=x;x=a;} if (y > z) { y= (x < z)? z:x;}}
  102. #endif