lbximage.h
上传用户:lctgjx
上传日期:2022-06-04
资源大小:8887k
文件大小:4k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
  2. /******************************************************************************
  3. Copyright 1994, 1998  The Open Group
  4. Permission to use, copy, modify, distribute, and sell this software and its
  5. documentation for any purpose is hereby granted without fee, provided that
  6. the above copyright notice appear in all copies and that both that
  7. copyright notice and this permission notice appear in supporting
  8. documentation.
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  14. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  15. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  16. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. Except as contained in this notice, the name of The Open Group shall not be
  18. used in advertising or otherwise to promote the sale, use or other dealings
  19. in this Software without prior written authorization from The Open Group.
  20. ******************************************************************************/
  21. /* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */
  22. #ifndef _LBX_IMAGE_H_
  23. #define _LBX_IMAGE_H_
  24. #include <X11/Xfuncproto.h>
  25. _XFUNCPROTOBEGIN
  26. typedef struct _LbxBitmapCompMethod {
  27.     char *methodName;
  28.     int inited;
  29.     int methodOpCode; /* to be filled on reply from server */
  30.     int (*compInit)(
  31. void
  32.     );
  33.     int (*compFunc)(
  34. unsigned char * /* inbuf */,
  35. unsigned char * /* outbuf */,
  36. int /* outbufSize */,
  37. int /* image_bytes */,
  38. int /* pixels_per_line */,
  39. int /* padded_bytes_per_scanline */,
  40. int /* reverse_bits */,
  41. int * /* bytesCompressed */
  42.     );
  43.     int (*decompFunc)(
  44. unsigned char * /* inbuf */,
  45. unsigned char * /* outbuf */,
  46. int /* image_bytes */,
  47. int /* pixels_per_line */,
  48. int /* padded_bytes_per_scanline */,
  49. int /* reverse_bits */
  50.     );
  51. } LbxBitmapCompMethod;
  52. #define LBX_MAX_DEPTHS 5
  53. typedef struct _LbxPixmapCompMethod {
  54.     char *methodName;
  55.     unsigned formatMask;
  56.     int depthCount;
  57.     int depths[LBX_MAX_DEPTHS];
  58.     int inited;
  59.     int methodOpCode; /* to be filled on reply from server */
  60.     int (*compInit)(
  61. void
  62.     );
  63.     int (*compFunc)(
  64. char * /* inbuf */,
  65. char * /* outbuf */,
  66. int /* outbufSize */,
  67. int /* format */,
  68. int /* depth */,
  69. int /* num_scan_lines */,
  70. int /* scan_line_size */,
  71. int * /* bytesCompressed */
  72.     );
  73.     int (*decompFunc)(
  74. char * /* inbuf */,
  75. char * /* outbuf */,
  76. int /* num_scan_lines */,
  77. int /* scan_line_size */
  78.     );
  79. } LbxPixmapCompMethod;
  80. extern int LbxImageEncodePackBits (
  81. char * /* inbuf */,
  82. char * /* outbuf */,
  83. int /* outbufSize */,
  84. int /* format */,
  85. int /* depth */,
  86. int /* num_scan_lines */,
  87. int /* scan_line_size */,
  88. int * /* bytesCompressed */
  89. );
  90. extern int LbxImageEncodeFaxG42D (
  91. unsigned char * /* inbuf */,
  92. unsigned char * /* outbuf */,
  93. int /* outbufSize */,
  94. int /* image_bytes */,
  95. int /* pixels_per_line */,
  96. int /* padded_bytes_per_scanline */,
  97. int /* reverse_bits */,
  98. int * /* bytesCompressed */
  99. );
  100. extern int LbxImageDecodePackBits (
  101. char * /* inbuf */,
  102. char * /* outbuf */,
  103. int /* num_scan_lines */,
  104. int /* scan_line_size */
  105. );
  106. extern int LbxImageDecodeFaxG42D (
  107. unsigned char * /* inbuf */,
  108. unsigned char * /* outbuf */,
  109. int /* image_bytes */,
  110. int /* pixels_per_line */,
  111. int /* padded_bytes_per_scanline */,
  112. int /* reverse_bits */
  113. );
  114. _XFUNCPROTOEND
  115. #define LBX_IMAGE_COMPRESS_SUCCESS 0
  116. #define LBX_IMAGE_COMPRESS_NO_SUPPORT 1
  117. #define LBX_IMAGE_COMPRESS_BAD_MALLOC 2
  118. #define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3
  119. #endif /* _LBX_IMAGE_H_ */