MIL_ID BufId, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue | //in |
This function allows you to control a specified data buffer setting.
Specifies the buffer setting to control.
See the Parameter associations section for possible values that can be specified.
Specifies the value needed for the setting.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
The following ControlType and corresponding ControlValue parameter settings are used to control general buffer settings.
For specifying general buffer
settings
|
|||||||||||||||||||||||||||||||||||||||
ControlType |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_ASSOCIATED_LUT |
Sets whether to associate or disassociate a LUT buffer with the specified image buffer. INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Specifies to remove the association between the LUT buffer and the image buffer. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL LUT buffer identifier |
Specifies the MIL identifier of the LUT buffer to associate with the image buffer. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DC_ALLOC | † | b | c | d | e | g | h | l | m | n | o | s | |||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | b | c | d | e | g | h | l | m | n | o | s | ||||||||||||||||||||||||||
M_DC_FREE | † | b | c | d | e | g | h | l | m | n | o | s | |||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | b | c | d | e | g | h | l | m | n | o | s | ||||||||||||||||||||||||||
M_LOCK + |
Locks the specified buffer to allow a memory pointer to obtain a valid buffer address. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_MAP |
Maps or unmaps the buffer to the memory address space of the process. (more details...) |
† | a | b | c | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | |||||||||||||||||||
M_DISABLE |
Unmaps the buffer from the address space of the process. (more details...) |
† | a | b | c | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | |||||||||||||||||||
M_ENABLE |
Maps the buffer to the address space of the process. (more details...) |
† | a | b | c | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | |||||||||||||||||||
M_MAX |
Sets the expected maximum pixel value of the buffer. INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
Value |
Specifies the expected maximum pixel value within the range of the buffer type. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_MIN |
Sets the expected minimum pixel value possible in the buffer. INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
Value |
Specifies the expected minimum pixel value within the range of the buffer type. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_MODIFICATION_HOOK |
Sets whether to run the user-defined functions hooked to the buffer's modification event upon the event. INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DISABLE |
Specifies that the user-defined functions should not be called. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_ENABLE |
Specifies that the user-defined functions should be called. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_MODIFIED |
Signals MIL that the buffer content was modified without using MIL. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_RESOLUTION_X |
Sets the X resolution of the image buffer in pixels per inch (PPI). INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Specifies an X resolution of 72 PPI. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
Value |
Specifies the X resolution in PPI. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_RESOLUTION_Y |
Sets the Y resolution of the image buffer in pixels per inch (PPI). INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Specifies a Y resolution of 72 PPI. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
Value |
Specifies the Y resolution in PPI. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_UNLOCK |
Unlocks the specified buffer. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_XPIXMAP_ALLOC | † | b | c | d | e | g | h | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | b | c | d | e | g | h | j | k | l | m | n | o | p | q | r | s | |||||||||||||||||||||
M_XPIXMAP_FREE | † | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | |||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_YCBCR_RANGE |
Specifies whether the YUV buffer's pixel values are YCbCr encoded, which limits the range of the buffer's pixel values. INQ (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DEFAULT |
Same as M_DISABLE. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_DISABLE |
Specifies not to YCbCr encode the YUV buffer's pixel values. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_YCBCR_HD |
Specifies to encode the YUV buffer's pixel values using the high-definition YCbCr standard. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
M_YCBCR_SD |
Specifies to encode the YUV buffer's pixel values using the standard-definition YCbCr standard. |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s |
You can add one of the following values to the above-mentioned value to set which processor can access the locked buffer.
For M_LOCK (Processor access
privileges)
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_GPU_ACCESS |
Locks the buffer and gives access to the GPU processor. |
||||||||||||||||||||||||||||||||||||||
M_HOST_ACCESS |
Locks the buffer and gives access to the Host processor. (more details...) |
You can add one or more of the following values to the above-mentioned value to set the buffer's read and write permission.
For M_LOCK (Read and write
permission)
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_READ |
Locks the buffer to be read only. |
||||||||||||||||||||||||||||||||||||||
M_READ+M_WRITE |
Locks the buffer to be read and write. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_WRITE |
Locks the buffer to be write only. |
For buffers with an M_IMAGE + M_COMPRESS attribute, ControlType and ControlValue can also be set to one of the values below.
Note that, if the buffer contains any data, setting one of these control types automatically deletes the data. This is because, for MIL to decompress the buffer's data, it must know the control values that were used in the compression. If you change one of these controls, MIL will be unable to decompress the data and the data is therefore irrelevant. Note that the control type M_TARGET_SIZE is the only control type that can be changed without affecting the data. For more information, see Chapter 27: JPEG and JPEG2000 compression.
For M_IMAGE + M_COMPRESS image
buffers
|
|||||||||||||||||||||||||||||||||||||||
ControlType |
Description
|
||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_DECOMPOSITION_LEVEL + |
Sets the number of iterations (decomposition levels) the discrete wavelet transform is applied to the image. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the number of iterations (decomposition levels). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HUFFMAN_AC |
Associates an AC Huffman table to the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HUFFMAN_AC_CHROMINANCE |
Associates an AC Huffman table to the U and V bands (chrominance) of the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_HUFFMAN_AC_LUMINANCE |
Associates an AC Huffman table to the Y band (luminance) of the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_HUFFMAN_DC |
Associates a DC Huffman table to the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HUFFMAN_DC_CHROMINANCE |
Associates a DC Huffman table to the U and V bands (chrominance) of the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_HUFFMAN_DC_LUMINANCE |
Associates a DC Huffman table to the Y band (luminance) of the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_PREDICTOR |
Sets the type of predictor. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
0 |
Specifies predictor #0 (no prediction). |
||||||||||||||||||||||||||||||||||||||
1 |
Specifies predictor #1 (the "pixel-to-the-left" predictor). (more details...) |
||||||||||||||||||||||||||||||||||||||
2 |
Specifies predictor #2 (the "pixel-above" predictor). |
||||||||||||||||||||||||||||||||||||||
M_Q_FACTOR + |
Sets the quantization factor. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
1 <= Value <= 99 |
Specifies the quantization factor. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_Q_FACTOR_CHROMINANCE |
Sets the chrominance quantization factor. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
1 <= Value <= 99 |
Specifies the factor. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_Q_FACTOR_LUMINANCE |
Sets the luminance quantization factor. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
1 <= Value <= 99 |
Specifies the factor. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_QUANTIZATION + |
Associates a quantization table to the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_QUANTIZATION_CHROMINANCE |
Associates a quantization table to the U and V bands (chrominance) of the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_QUANTIZATION_LUMINANCE |
Associates a quantization table to the Y band (luminance) of the buffer. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL M_ARRAY buffer identifier |
Specifies the identifier of the array buffer containing the table. |
||||||||||||||||||||||||||||||||||||||
M_RESTART_INTERVAL |
Sets the number of rows or 8x8 blocks between restart markers in a compressed image. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies after how many rows (for JPEG lossless buffers) or 8x8 blocks (for JPEG lossy buffers) of data to place restart markers. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TARGET_SIZE |
Sets the size of the buffer into which the source image is compressed. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the size, in bytes. (more details...) |
You can add one of the following values to the above-mentioned values to specify the color bands to affect.
When dealing with M_Q_FACTOR and M_QUANTIZATION, the following values are only supported with JPEG2000 lossy buffers.
For specifying the color bands to
affect
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ALL_BANDS |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to all bands of the buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BLUE |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to the blue band only (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
M_GREEN |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to the green band only (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
M_RED |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to the red band only (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
M_U |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to the U band only (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
M_V |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to the V band only (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
M_Y |
[For
essential MIL-Lite information, see remarks ]
Applies the specified control value to the Y band only (for YUV buffers). |
Parameters
BufId See BufId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. |
Parameters
BufId See BufId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |