IMCMPEncoderOption Interface
Interface Properties:
Type |
Property name |
Description |
|||||
long |
Format |
Gets or sets a value that represents the codec A COmpressor Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. combined with a DECompressor, or encoder Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. and a decoder Also known as a decompressor, this is a module or algorithm to decompress data., which allows you to both compress and decompress that same data. format. Possible values are: |
|||||
|
|
Value |
Meaning |
||||
|
|
FORMAT_MCMP |
[5] MCMP format |
||||
|
|
FORMAT_LOSSLESSJPEG |
[-1] Lossless JPEG |
||||
|
|
FORMAT_MJPEG_411 |
[21] MJPEG 4:1:1 subsampling. Has a higher compression ratio than 4:2:2 and 4:4:4. |
||||
|
|
FORMAT_MJPEG_422 |
[23] MJPEG 4:2:2 subsampling. Lower compression ratio than 4:1:1, higher compression than 4:4:4. |
||||
|
|
FORMAT_MJPEG_444 |
[10] MJPEG 4:4:4 subsampling |
||||
long |
Quality |
Gets or sets the quality factor for compression. A QFactor of 2 has the highest quality and lowest compression ratio. As the QFactor increases, the quality decreases and the compression ratio increases. A QFactor of 255 has the lowest quality and highest compression ratio. Possible values for each format are: |
|||||
|
|
Format |
Possible values |
||||
|
|
FORMAT_MCMP |
-9...-1 and 2...255 where negative values represent: |
||||
|
|
|
QFACTOR_PQ1 |
[-1] Perfect quality option 1 | |||
|
|
|
QFACTOR_PQ2 |
(-2) Perfect quality option 2 | |||
|
|
|
QFACTOR_QFS |
(-3) Quality far more important than size | |||
|
|
|
QFACTOR_QMS |
(-4) Quality more important than size | |||
|
|
|
QFACTOR_QS |
(-5) Quality and size are equally important | |||
|
|
|
QFACTOR_SQS |
(-6) Size more important than quality - Sharp | |||
|
|
|
QFACTOR_SQT |
(-7) Size more important than quality - Less Tilling | |||
|
|
|
QFACTOR_MCQ |
(-8) Max Compression, keeping quality as good as possible | |||
|
|
|
QFACTOR_MC |
(-9) Max compression | |||
|
|
FORMAT_LOSSLESSJPEG |
QFactor is ignored for lossless JPEG. |
||||
|
|
FORMAT_MJPEG_411 |
2...255 |
||||
|
|
FORMAT_MJPEG_422 |
2...255 |
||||
|
|
FORMAT_MJPEG_444 |
2...255 |
||||
long |
Flags |
Gets or sets the compression flags. These flags can be OR-ed together, except for the FLAGS_INTERLEAVE_XXX flags. Only one of the interleave flags can be set. Setting FLAGS_INTERLEAVE_NEVER is equal to setting no interleave flags at all,. Possible values are: |
|||||
|
|
Value |
Meaning |
||||
|
|
FLAGS_DISABLE_COMPRESSION |
[0x0001] Disable compression. |
||||
|
|
FLAGS_DISABLE_DECOMPRESSION |
[0x0002] Enable compression. |
||||
|
|
FLAGS_INTERLEAVE_NEVER |
[0x0000] Save images non-interleaved |
||||
|
|
FLAGS_INTERLEAVE_288 |
[0x0004] Interleave images with height >= 288 |
||||
|
|
FLAGS_INTERLEAVE_ALWAYS |
[0x0008] Set this to save interlaced MJPG files |
||||
|
|
FLAGS_FLIP_YUV |
[0x0010] Indicates how YUV video data is handled. If this flag is not set, then YUV video with a positive height value (BITMAPINFOHEADER.biHeight) is handled as normal video, top side up. YUV video with a negative height value is handled as flipped video, bottom side up. If this flag is set, then YUV video with a positive height value is handled as flipped video, bottom side up, and YUV video with a negative height value is handled as normal, top side up. |
||||
|
|
FLAGS_OVERRIDE_DEFAULTS |
[0x0020] If this flag is set, then the defaults are overridden. |
||||
|
|
FLAGS_NO_REGISTRY_SAVE |
[0x0040] Do not save these settings in the registry. Set this flag if the compression is temporarily disabled because the input does not permit compression. |
||||
long |
FilterState |
(Read only) Gets a value that represents the state of the filter. Possible values are: |
|||||
|
|
FilterState_Stopped |
[0] The filter is stopped. |
||||
|
|
FilterState_Paused |
[1] The filter is paused. |
||||
|
|
FilterState_Running |
[2] The filter is running. |
This is a standard DirectShow interface. For full documentation, please refer to DirectShow documentation.
This interface allows you to select only the quality factor for the codec. For full control over the codec settings, use the IMCMPEncoderOption interface.
Type |
Property name |
Description |
|
long |
Quality |
Gets or sets the quality factor for compression. Possible values are: |
|
|
|
Value |
Meaning |
|
|
0.0...1.0 |
Same meaning as in DirectShow. 1.0 is the best quality/lowest compression and 0 is lowest quality/highest compression. |
|
|
Over 1.0 |
Lossless compression. Setting the quality factor to this value will automatically set the format to Lossless JPEG. |
|
|
-9...-1 |
Predefined quality factor. For more information on these values, refer to IMCMPEncoderOption::QFactor. Setting the quality value to one of these values will automatically set the format to MCMP. |
|
|
< -9 |
Undefined. Do not use. |