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.

107 lines
4.7 KiB

  1. /*
  2. * @DEC_COPYRIGHT@
  3. */
  4. /*
  5. * HISTORY
  6. * $Log: scon_internals.h,v $
  7. * $EndLog$
  8. */
  9. /*****************************************************************************
  10. ** Copyright (c) Digital Equipment Corporation, 1997 **
  11. ** **
  12. ** All Rights Reserved. Unpublished rights reserved under the copyright **
  13. ** laws of the United States. **
  14. ** **
  15. ** The software contained on this media is proprietary to and embodies **
  16. ** the confidential technology of Digital Equipment Corporation. **
  17. ** Possession, use, duplication or dissemination of the software and **
  18. ** media is authorized only pursuant to a valid written license from **
  19. ** Digital Equipment Corporation. **
  20. ** **
  21. ** RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the U.S. **
  22. ** Government is subject to restrictions as set forth in Subparagraph **
  23. ** (c)(1)(ii) of DFARS 252.227-7013, or in FAR 52.227-19, as applicable. **
  24. ******************************************************************************/
  25. #ifndef _SCON_INTERNALS_H_
  26. #define _SCON_INTERNALS_H_
  27. #include "scon.h"
  28. typedef struct SconVideoInfo_s {
  29. dword Width;
  30. dword Height;
  31. SconBoolean_t NegHeight; /* height is negative */
  32. dword Stride;
  33. dword FourCC;
  34. dword BPP; /* bits per pixel */
  35. dword Pixels; /* total pixels in a frame */
  36. dword ImageSize; /* image size in bytes */
  37. dword RGBmasks; /* 565, 555, 888 */
  38. dword Rmask; /* Red mask */
  39. dword Gmask; /* Green mask */
  40. dword Bmask; /* Blue mask */
  41. } SconVideoInfo_t;
  42. typedef struct SconAudioInfo_s {
  43. dword SPS; /* samples per second: 8000, 11025, 22050, etc */
  44. dword BPS; /* bits per sample: 8 or 16 */
  45. dword Channels; /* channels: 1=mono, 2=stereo */
  46. } SconAudioInfo_t;
  47. typedef struct SconInfo_s {
  48. SconMode_t Mode;
  49. SconBoolean_t InputInited; /* input format has been setup */
  50. SconBoolean_t OutputInited; /* output format has been setup */
  51. SconBoolean_t SameFormat; /* input and output are the same format */
  52. SconBoolean_t Flip; /* image must be flipped when converted */
  53. SconBoolean_t ScaleDown; /* input image is being scaled down */
  54. SconBoolean_t ScaleUp; /* input image is being scaled up */
  55. union {
  56. SconVideoInfo_t vinfo;
  57. SconAudioInfo_t ainfo;
  58. } Input;
  59. union {
  60. SconVideoInfo_t vinfo;
  61. SconAudioInfo_t ainfo;
  62. } Output;
  63. unsigned char *FImage; /* format conversion image buffer */
  64. dword FImageSize;
  65. unsigned char *SImage; /* scaling image buffer */
  66. dword SImageSize;
  67. void *Table; /* conversion lookup table */
  68. dword TableSize;
  69. void *dbg; /* debug handle */
  70. } SconInfo_t;
  71. /********************** Private Prototypes ***********************/
  72. /*
  73. * scon_video.c
  74. */
  75. unsigned dword sconCalcImageSize(SconVideoInfo_t *vinfo);
  76. SconStatus_t sconConvertVideo(SconInfo_t *Info, void *inbuf, dword inbufsize,
  77. void *outbuf, dword outbufsize);
  78. /*
  79. * scon_yuv_to_rgb.c
  80. */
  81. SconStatus_t sconInitYUVtoRGB(SconInfo_t *Info);
  82. SconStatus_t scon422ToRGB565(unsigned char *inimage, unsigned char *outimage,
  83. unsigned dword width, unsigned dword height,
  84. dword stride, unsigned qword *pTable);
  85. SconStatus_t scon420ToRGB565(unsigned char *inimage, unsigned char *outimage,
  86. unsigned dword width, unsigned dword height,
  87. dword stride, unsigned qword *pTable);
  88. SconStatus_t scon422ToRGB888(unsigned char *inimage, unsigned char *outimage,
  89. unsigned dword width, unsigned dword height,
  90. dword stride, unsigned qword *pTable);
  91. SconStatus_t scon420ToRGB888(unsigned char *inimage, unsigned char *outimage,
  92. unsigned dword width, unsigned dword height,
  93. dword stride, unsigned qword *pTable);
  94. SconStatus_t sconInitRGBtoYUV(SconInfo_t *Info);
  95. SconStatus_t sconRGB888To420(unsigned char *inimage, unsigned char *outimage,
  96. unsigned dword width, unsigned dword height,
  97. dword stride, unsigned qword *pTable);
  98. #endif /* _SCON_INTERNALS_H_ */