Previous | Contents | Index |
#include <mme/mme_api.h> MMRESULT ICCompressQuery(HIC hic, LPBITMAPINFOHEADER lpbiInput, LPBITMAPINFOHEADER lpbiOutput); |
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICCompressQuery function. See Chapter 2 for more information about the memory allocation functions.
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the data output. If NULL, then any
output format is acceptable.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICCompressQuery function. See Chapter 2 for more information about the memory allocation functions.
The ICCompressQuery function determines if a compressor can compress a specific format.Extensions None.
Returns ICERR_OK if the compression is supported; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the compressor is not open, or the compressor is not open for compression. |
ICERR_BADFORMAT | The lpbiOutput and lpbiInput arguments are not acceptable formats. |
#include <mme/mme_api.h> MMRESULT ICCompressUnprepareHeader(HIC hic, LPBITMAPINFOHEADER lpbiOutput, LPVOID lpData, LPBITMAPINFOHEADER lpbiInput, LPVOID lpBits); |
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data
structure holding the output format. The
BITMAPINFOHEADER data structure must be allocated with
the
mmeAllocMem
function before being passed to the
ICCompressUnprepareHeader
function. See Chapter 2 for more information about allocating
memory for data structures.
LPVOID lpData
Specifies a pointer to the output data buffer. The data buffer must be
allocated with the
mmeAllocBuffer
function before being passed to the
ICCompressUnprepareHeader
function. See Chapter 2 for more information about allocating
memory for data buffers.
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data
structure containing the input format.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICCompressUnprepareHeader function. See Chapter 2 for more information about allocating memory for data structures.
LPVOID lpBits
Specifies a pointer to the input data buffer. The data buffer must be
allocated with the
mmeAllocBuffer
function before being passed to the
ICCompressUnprepareHeader
function. See Chapter 2 for more information about allocating
memory for data buffers.
The ICCompressUnprepareHeader function unprepares buffers prepared with ICCompressUnprepareHeader .Extensions The ICCompressUnprepareHeader function is a Compaq extension to the Microsoft multimedia API specification.This function should be called before ICCompressEnd and after all compression operations have been completed and all buffers have been returned to the application.
Returns ICERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the compressor is not open, or the compressor is not open for compression. |
ICERR_BADPARAM | The lpbiInput or lpbiOutput, or lpData or lpBits arguments are NULL; or the hardware cannot be properly set up for the operation. The parameters are not the same as those specified in the ICCompressBegin call (with the exception of the biSizeImage fields). The buffers have not been previously prepared. |
ICERR_CANTUPDATE | The compressor is not in operation, that is, ICCompressBegin has not yet been called or ICCompressEnd has been called. The buffer should be unprepared before calling ICCompressEnd . Some compressors may choose to unprepare all prepared headers when ICCompressEnd is called. |
ICERR_INTERNAL | An internal driver error occurred. No more detailed information is available. |
#include <mme/mme_api.h> MMRESULT ICDecompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, LPBITMAPINFOHEADER lpbi, LPVOID lpBits); |
DWORD dwFlags
Specifies flags for decompression. The following flags are defined:
ICDECOMPRESS_HURRYUP
Indicates that the decompressor should try to decompress at a faster rate. When an application uses this flag, it should not draw the decompressed data.
NULL
Indicates that the decompressor will decompress at normal rate.
LPBITMAPINFOHEADER lpbiFormat
Specifies a pointer to a BITMAPINFOHEADER data
structure containing the format of the compressed data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompress function. See Chapter 2 for more information about the memory allocation functions.
LPVOID lpData
Specifies a pointer to the input data. The data buffer must be
allocated with the
mmeAllocBuffer
function before being passed to the
ICDecompress
function. See Chapter 2 for more information about the memory
allocation functions.
LPBITMAPINFOHEADER lpbi
Specifies a pointer to a BITMAPINFOHEADER data
structure containing the output format.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompress function. See Chapter 2 for more information about the memory allocation functions.
LPVOID lpBits
Specifies a pointer to a data buffer for the decompressed data. The
data buffer must be allocated with the
mmeAllocBuffer
function before being passed to the
ICDecompress
function. See Chapter 2 for more information about the memory
allocation functions.
The ICDecompress function decompresses a single video frame.Extensions None.The lpBits argument must point to a buffer large enough to hold the decompressed data. Applications can calculate the size of this buffer using information returned from the ICDecompressGetFormat function. However, if an application requires the X image or YUV image format, it must calculate the buffer size using one of the following formulas:
Format Bits/Pixel Formula BICOMP_DECXIMAGEDIB 8 PAD(width) * height * 1 BICOMP_DECXIMAGEDIB 24 PAD(width) * height * 4 BICOMP_DECYUVDIB 16 PAD(width) * height * 2 where PAD is:
#define PAD(size) (((size) + 3) & ~0x3)
X images must be padded to 4 bytes on each scanline.
The performance of the AlphaStation's built-in HX display and any other HX (also called SFB) graphics controller is improved if X images are aligned on 8-byte boundaries and have scanline widths that are multiples of 8.
The biSizeImage field in the lpbiFormat argument may change for each call to the ICDecompress function to reflect different sizes of compressed data buffers. To change any other fields in either the lpbiFormat or lpbi arguments, the decompression device must be reconfigured by calling the ICDecompressEnd function, followed by the ICDecompressBegin function.
Note
Some video devices may check decompression parameters, detect a change, and reconfigure themselves. In these cases, the ICDecompress function can return error codes associated with the ICDecompressEnd and ICDecompressBegin functions.
Returns ICERR_OK if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbiFormat and lpbi arguments are not acceptable formats. |
ICERR_BADIMAGESIZE | The specified image size is invalid. |
ICERR_BADPARAM | The lpbiFormat or lpbi, or lpData or lpBits arguments are NULL; or the hardware cannot be properly set up for the operation. |
#include <mme/mme_api.h> MMRESULT ICDecompressBegin(HIC hic, LPBITMAPINFOHEADER lpbiInput, LPBITMAPINFOHEADER lpbiOutput); |
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressBegin function. See Chapter 2 for more information about the memory allocation functions.
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the output data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressBegin function. See Chapter 2 for more information about the memory allocation functions.
The ICDecompressBegin function prepares a decompressor for decompressing data. Call this function before calling the ICDecompress function.Extensions None.The ICDecompressBegin function returns the ICERR_ERROR error code when attempting to decompress to 8-bit X image format and the palette has not been negotiated with the ICDecompressGetPalette function. A palette is not required for 24-bit X image, YUV, or BI_BITFIELDS format.
Returns ICERR_OK if the specified decompression is supported; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbiInput and lpbiOutput arguments are not acceptable formats. |
ICERR_BADPARAM | The lpbiInput argument, lpbiOutput argument, or both are NULL. |
ICERR_ERROR | A palette has not been negotiated. |
#include <mme/mme_api.h> MMRESULT ICDecompressEnd(HIC hic) |
The ICDecompressEnd function tells a decompressor to end decompression.Extensions None.
Returns ICERR_OK if the function is successful; otherwise, it returns the following error code:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
#include <mme/mme_api.h> MMRESULT ICDecompressGetFormat(HIC hic, LPBITMAPINFOHEADER lpbiInput, LPBITMAPINFOHEADER lpbiOutput); |
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetFormat function. See Chapter 2 for more information about the memory allocation functions.
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data
structure used to return the format of the output data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetFormat function. See Chapter 2 for more information about the memory allocation functions.
The ICDecompressGetFormat function determines the default output of a decompressor.Extensions None.
Returns the size in bytes of the decompressor's default output if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbiInput and lpbiOutput arguments are not acceptable formats. |
If the default output requires a colormap, the output size includes
enough space to contain the colormap. If the default output does not
require a colormap, then that information is not available from the
ICDecompressGetFormat
function. See Also
ICDecompress
,
ICDecompressGetFormatSize
,
ICDecompressGetPalette
,
ICDecompressQuery
#include <mme/mme_api.h> MMRESULT ICDecompressGetFormatSize(HIC hic, LPBITMAPINFOHEADER lpbi); |
LPBITMAPINFOHEADER lpbi
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetFormatSize function. See Chapter 2 for more information about the memory allocation functions.
The ICDecompressGetFormatSize function obtains the maximum required size in bytes of the output structure for the decompressor. Use the ICDecompressGetFormatSize function to determine the size of the output format buffer that must be allocated for the ICDecompressGetFormat function. If any of the possible output formats requires an RGBQUAD palette, then the maximum output size would include the size required to contain that palette.Extensions None.
Returns the maximum required size in bytes of the output structure for the decompressor if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbi argument is not an acceptable format. |
#include <mme/mme_api.h> MMRESULT ICDecompressGetPalette(HIC hic, LPBITMAPINFOHEADER lpbiInput, LPBITMAPINFOHEADER lpbiOutput); |
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data
structure indicating the format of the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetPalette function. See Chapter 2 for more information about the memory allocation functions.
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data
structure used to return the color table. The space reserved for the
color table must accommodate a full color table for the output format.
For instance, if the biBitCount field is 4, then the
table must accommodate 16 entries; if the biBitCount
field is 8, then the table must accommodate 256 entries.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetPalette function. See Chapter 2 for more information about the memory allocation functions.
The ICDecompressGetPalette function obtains the palette for the output format of a decompressor. The palette is the range of colors that can be used for display.Extensions Compaq has extended the data in the BITMAPINFOHEADER and RGBQUAD data structures pointed to by the lpbiOutput argument of the ICDecompressGetPalette function. These extensions have been made in order to provide the palette information necessary to render images to the X image format.The return value will be the size in bytes that includes the colormap supported by the decompressor.
See Section 5.2.4.3 for more information about specifying the palette.
See Section 5.2.4.3 for more information about the extensions to the data structure and specifying the palette.
Returns the size of the output data format structure if the function is successful; otherwise, it returns one of the following error codes:
Error Code | Description |
---|---|
ICERR_BADHANDLE | The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. |
ICERR_BADFORMAT | The lpbiInput and lpbiOutput arguments are not acceptable formats. |
Previous | Next | Contents | Index |