|
libvmx
VMX Codec
|
Go to the source code of this file.
Data Structures | |
| struct | VMX_SIZE |
| struct | VMX_SLICE_DATA |
| struct | VMX_SLICE_SET |
| struct | VMX_PLANE |
| struct | VMX_INSTANCE |
Macros | |
| #define | VMX_API extern "C" __attribute__((visibility("default"))) |
Typedefs | |
| typedef unsigned long long | buffer_t |
| typedef unsigned char | BYTE |
Enumerations | |
| enum | VMX_FORMAT { VMX_FORMAT_PROGRESSIVE , VMX_FORMAT_INTERLACED } |
| enum | VMX_ERR { VMX_ERR_OK , VMX_ERR_UNKNOWN , VMX_ERR_INVALID_CODEC_FORMAT , VMX_ERR_INVALID_SLICE_COUNT , VMX_ERR_BUFFER_OVERFLOW , VMX_ERR_INVALID_INSTANCE , VMX_ERR_INVALID_PARAMETERS } |
| enum | VMX_PROFILE { VMX_PROFILE_DEFAULT = 0 , VMX_PROFILE_LQ = 33 , VMX_PROFILE_SQ = 66 , VMX_PROFILE_HQ = 99 , VMX_PROFILE_OMT_LQ = 133 , VMX_PROFILE_OMT_SQ = 166 , VMX_PROFILE_OMT_HQ = 199 } |
| enum | VMX_COLORSPACE { VMX_COLORSPACE_UNDEFINED = 0 , VMX_COLORSPACE_BT601 = 601 , VMX_COLORSPACE_BT709 = 709 } |
| enum | VMX_CODEC_FORMAT { VMX_CODEC_FORMAT_NONE , VMX_CODEC_FORMAT_PROGRESSIVE , VMX_CODEC_FORMAT_INTERLACED , VMX_CODEC_FORMAT_EXTENDED } |
| enum | VMX_IMAGE_FORMAT { VMX_IMAGE_UYVY , VMX_IMAGE_YUY2 , VMX_IMAGE_NV12 , VMX_IMAGE_YV12 , VMX_IMAGE_YUVPLANAR422 , VMX_IMAGE_BGRA , VMX_IMAGE_BGRX , VMX_IMAGE_UYVA , VMX_IMAGE_P216 , VMX_IMAGE_PA16 } |
Functions | |
| VMX_API VMX_INSTANCE * | VMX_Create (VMX_SIZE dimensions, VMX_PROFILE profile, VMX_COLORSPACE colorSpace) |
| VMX_API void | VMX_Destroy (VMX_INSTANCE *instance) |
| VMX_API void | VMX_SetQuality (VMX_INSTANCE *instance, int q) |
| VMX_API int | VMX_GetQuality (VMX_INSTANCE *instance) |
| VMX_API void | VMX_GetEncodingParameters (VMX_INSTANCE *instance, int *frameMin, int *frameMax, int *minQuality, int *dcShift) |
| VMX_API void | VMX_SetEncodingParameters (VMX_INSTANCE *instance, int frameMin, int frameMax, int minQuality, int dcShift) |
| VMX_API VMX_ERR | VMX_DecodeBGRA (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodeBGRX (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodeP216 (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodePA16 (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodeUYVY (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodeUYVA (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodeYUY2 (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodePreviewBGRA (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodePreviewBGRX (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodePreviewUYVY (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodePreviewUYVA (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_DecodePreviewYUY2 (VMX_INSTANCE *instance, BYTE *dst, int stride) |
| VMX_API VMX_ERR | VMX_EncodeBGRA (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeBGRX (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeUYVY (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeUYVA (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeYUY2 (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeNV12 (VMX_INSTANCE *instance, BYTE *srcY, int srcStrideY, BYTE *srcUV, int srcStrideUV, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeYV12 (VMX_INSTANCE *instance, BYTE *srcY, int srcStrideY, BYTE *srcU, int srcStrideU, BYTE *srcV, int srcStrideV, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodeP216 (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodePA16 (VMX_INSTANCE *instance, BYTE *src, int stride, int interlaced) |
| VMX_API VMX_ERR | VMX_EncodePlanar (VMX_INSTANCE *instance, int interlaced) |
| VMX_API VMX_ERR | VMX_LoadFrom (VMX_INSTANCE *instance, BYTE *data, int dataLen) |
| VMX_API int | VMX_SaveTo (VMX_INSTANCE *instance, BYTE *dst, int maxLen) |
| VMX_API int | VMX_GetEncodedPreviewLength (VMX_INSTANCE *instance) |
| VMX_API void | VMX_BGRXToUYVY (BYTE *pSrc, int srcStride, BYTE *pDst, int dstStride, VMX_SIZE size) |
| VMX_API int | VMX_BGRXToUYVYConditional (BYTE *pSrc, BYTE *pSrcPrev, int srcStride, BYTE *pDst, int dstStride, VMX_SIZE size) |
| VMX_API float | VMX_CalculatePSNR (BYTE *p1, BYTE *p2, int stride, int bytesPerPixel, VMX_SIZE sz) |
| VMX_API int | VMX_GetThreads (VMX_INSTANCE *instance) |
| VMX_API void | VMX_SetThreads (VMX_INSTANCE *instance, int numThreads) |
| VMX_API int | VMX_Test (VMX_INSTANCE *instance, short *src, short *dst) |
| void | VMX_ResetData (VMX_SLICE_DATA *s) |
| void | VMX_ResetStream (VMX_INSTANCE *instance) |
Variables | |
| const int | VMX_SLICE_HEIGHT = 16 |
| const int | VMX_QUALITY_COUNT = 25 |
| const int | VMX_MAX_PLANES = 4 |
| const int | VMX_DECODE_MATRIX_COUNT = 64 |
| const int | VMX_ENCODE_MATRIX_COUNT = 192 |
| #define VMX_API extern "C" __attribute__((visibility("default"))) |
| typedef unsigned long long buffer_t |
| typedef unsigned char BYTE |
| enum VMX_CODEC_FORMAT |
| enum VMX_COLORSPACE |
| enum VMX_ERR |
| enum VMX_FORMAT |
| enum VMX_IMAGE_FORMAT |
| enum VMX_PROFILE |
| VMX_API void VMX_BGRXToUYVY | ( | BYTE * | pSrc, |
| int | srcStride, | ||
| BYTE * | pDst, | ||
| int | dstStride, | ||
| VMX_SIZE | size ) |
Helper function to convert a BGRX image to UYVY. The destination buffer must be 64byte aligned.
| [in] | pSrc | The source pixels in BGRA format. Alpha is ignored. |
| [in] | srcStride | The stride in bytes of each row of source pixels. |
| [in] | pDst | The destination buffer. This must be 64byte aligned. |
| [in] | dstStride | The stride in bytes of each row of destination pixels. |
| [in] | size | The dimensions of the pixels. |
| VMX_API int VMX_BGRXToUYVYConditional | ( | BYTE * | pSrc, |
| BYTE * | pSrcPrev, | ||
| int | srcStride, | ||
| BYTE * | pDst, | ||
| int | dstStride, | ||
| VMX_SIZE | size ) |
Helper function to convert a BGRX image to UYVY.
Only changed pixels between pSrc and pSrcPrev will be copied.
pDst will be left untouched if no pixels have changed, and no conversion will occur.
The destination buffer must be 64byte aligned.
| [in] | pSrc | The source pixels in BGRA format. Alpha is ignored. |
| [in] | pSrcPrev | The previous source pixels in BGRA format. Alpha is ignored. |
| [in] | srcStride | The stride in bytes of each row of source pixels. |
| [in] | pDst | The destination buffer. This must be 64byte aligned. |
| [in] | dstStride | The stride in bytes of each row of destination pixels. |
| [in] | size | The dimensions of the pixels. |
| VMX_API float VMX_CalculatePSNR | ( | BYTE * | p1, |
| BYTE * | p2, | ||
| int | stride, | ||
| int | bytesPerPixel, | ||
| VMX_SIZE | sz ) |
Helper function to calculate the PSNR of two frames to assess image quality.
The first image should be the original image, and the second the compressed to compare.
| VMX_API VMX_INSTANCE * VMX_Create | ( | VMX_SIZE | dimensions, |
| VMX_PROFILE | profile, | ||
| VMX_COLORSPACE | colorSpace ) |
Create a new instance of the codec.
| [in] | dimensions | The pixel size of the image. Supports a minimum dimension of 16x16 and a maximum of 7680x4320 (8K). |
| [in] | profile | Select a profile to use when encoding. |
| [in] | colorSpace | Specify the color space to use when converting between RGB and YUV. Default is BT709. |
| VMX_API VMX_ERR VMX_DecodeBGRA | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into BGRA buffer. BGRA is the same as ARGB32 and A8R8G8B8 on Windows
This should only be used where there is an alpha channel. Otherwise use BGRX.
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API VMX_ERR VMX_DecodeBGRX | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into BGRX buffer. BGRX is the same as RGB32 and X8R8G8B8 on Windows
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API VMX_ERR VMX_DecodeP216 | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into a P216 4:2:2 buffer.
This is a 16bit Y plane followed by an interlaved 16bit UV plane.
Only the most significant 10bits is valid, so the 6 least signifiant bits will be 0. Shifting the values to the right by 6 is sufficient to convert back to 10bit.
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API VMX_ERR VMX_DecodePA16 | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into a PA16 4:2:2:4 buffer.
This is a 16bit Y plane followed by an interleaved 16bit UV plane followed by a 16bit alpha plane.
Only the most significant 10bits is valid, so the 6 least signifiant bits will be 0. Shifting the values to the right by 6 is sufficient to convert back to 10bit.
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API VMX_ERR VMX_DecodePreviewBGRA | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decodes a special 1/8th preview of the compressed image
This is calculated by dividing the width and height of the instance by 8 and then making sure the width is at least divisible by 2
Interlaced frames are a special case where the height is subtracted by 1 if not divisible by 2
Example 1920x1080 becomes 240x135 for progressive, 240x134 for interlaced.
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer |
| [in] | stride | The stride in bytes of each row of pixels |
| VMX_API VMX_ERR VMX_DecodePreviewBGRX | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Same as VMX_DecodePreviewBGRA except without alpha channel (alpha = 255)
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer |
| [in] | stride | The stride in bytes of each row of pixels |
| VMX_API VMX_ERR VMX_DecodePreviewUYVA | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Same as VMX_DecodePreviewBGRA except for UYVA output
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer |
| [in] | stride | The stride in bytes of each row of pixels |
| VMX_API VMX_ERR VMX_DecodePreviewUYVY | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Same as VMX_DecodePreviewBGRA except for UYVY output
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer |
| [in] | stride | The stride in bytes of each row of pixels |
| VMX_API VMX_ERR VMX_DecodePreviewYUY2 | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Same as VMX_DecodePreviewBGRA except for YUY2 output
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer |
| [in] | stride | The stride in bytes of each row of pixels |
| VMX_API VMX_ERR VMX_DecodeUYVA | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into a UYVA buffer. This is uyvy422 in FFmpeg, followed by an alpha plane with half the stride.
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API VMX_ERR VMX_DecodeUYVY | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into a UYVY buffer. This is uyvy422 in FFmpeg
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API VMX_ERR VMX_DecodeYUY2 | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | stride ) |
Decode frame into a YUY2 buffer. This is yuyv422 in FFmpeg
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The destination buffer to write the decoded frame to |
| [in] | stride | The stride of the destination buffer in bytes |
| VMX_API void VMX_Destroy | ( | VMX_INSTANCE * | instance | ) |
Destroy and free up memory of instance created with VMX_Create
| VMX_API VMX_ERR VMX_EncodeBGRA | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a BGRA image. This is the same as the ARGB32 in DirectShow or A8R8G8B8 in Direct3D
The Alpha channel is included in the encoded image. If you do not require alpha use the BGRX functions instead.
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodeBGRX | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a BGRX image. This is the same as the RGB32 in DirectShow or X8R8G8B8 in Direct3D
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodeNV12 | ( | VMX_INSTANCE * | instance, |
| BYTE * | srcY, | ||
| int | srcStrideY, | ||
| BYTE * | srcUV, | ||
| int | srcStrideUV, | ||
| int | interlaced ) |
Encode a NV12 image.
| [in] | instance | The instance created using VMX_Create |
| [in] | srcY | The Y plane source pixels |
| [in] | srcStrideY | The stride of the Y plane in bytes |
| [in] | srcUV | The UV plane source pixels |
| [in] | srcStrideUV | The stride of the UV plane in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodeP216 | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a 4:2:2 P216 image.
This is a 16bit Y plane followed by an interleaved 16bit UV plane.
Only the most significant 10bits is valid, so the 6 least signifiant bits must be 0. Shifting 10-bit values to the left by 6 is sufficient.
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodePA16 | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a 4:2:2:4 PA16 image.
This is a 16bit Y plane followed by an interleaved 16bit UV plane followed by a 16bit alpha plane.
Only the most significant 10bits is valid, so the 6 least signifiant bits must be 0. Shifting 10-bit values to the left by 6 is sufficient.
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodePlanar | ( | VMX_INSTANCE * | instance, |
| int | interlaced ) |
| VMX_API VMX_ERR VMX_EncodeUYVA | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a UYVA image.
This is a UYVY image followed immediately by an alpha plane with each line consisting of half the stride.
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodeUYVY | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a UYVY image.
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodeYUY2 | ( | VMX_INSTANCE * | instance, |
| BYTE * | src, | ||
| int | stride, | ||
| int | interlaced ) |
Encode a YUY2 image.
| [in] | instance | The instance created using VMX_Create |
| [in] | src | The source pixels |
| [in] | stride | The stride of the source pixels in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API VMX_ERR VMX_EncodeYV12 | ( | VMX_INSTANCE * | instance, |
| BYTE * | srcY, | ||
| int | srcStrideY, | ||
| BYTE * | srcU, | ||
| int | srcStrideU, | ||
| BYTE * | srcV, | ||
| int | srcStrideV, | ||
| int | interlaced ) |
Encode a YV12 or I420 image.
| [in] | instance | The instance created using VMX_Create |
| [in] | srcY | The Y plane source pixels |
| [in] | srcStrideY | The stride of the Y plane in bytes |
| [in] | srcU | The U plane source pixels |
| [in] | srcStrideU | The stride of the U plane in bytes |
| [in] | srcV | The V plane source pixels |
| [in] | srcStrideV | The stride of the V plane in bytes |
| [in] | interlaced | 1 if interlaced, 0 if progressive |
| VMX_API int VMX_GetEncodedPreviewLength | ( | VMX_INSTANCE * | instance | ) |
Returns the portion of the compressed frame that is needed to decode a preview.
| VMX_API void VMX_GetEncodingParameters | ( | VMX_INSTANCE * | instance, |
| int * | frameMin, | ||
| int * | frameMax, | ||
| int * | minQuality, | ||
| int * | dcShift ) |
Get current internal encoding parameters.
| [in] | instance | The instance created using VMX_Create |
| [out] | frameMin | If an encoded frame falls below this value, quality will be increased for next frame |
| [out] | frameMax | If an encoded frame is over this value, quality will be decreased for the next frame |
| [out] | minQuality | The quality will not fall below this value regardless of resulting bitrate |
| [out] | dcShift | Determines the DC precision where 0= 11bit, 1 = 10bit, 2= 9bit, 3= 8bit |
| VMX_API int VMX_GetQuality | ( | VMX_INSTANCE * | instance | ) |
Retrieve the current quality setting used by the encoder
This is adjusted automatically on the fly to meet the bitrate requirements and will change from frame to frame
| [in] | instance | The instance created using VMX_Create |
| VMX_API int VMX_GetThreads | ( | VMX_INSTANCE * | instance | ) |
Get the number of threads currently configured for encoding/decoding. These are automatically set based on the dimensions/profile.
| [in] | instance | The instance created using VMX_Create |
| VMX_API VMX_ERR VMX_LoadFrom | ( | VMX_INSTANCE * | instance, |
| BYTE * | data, | ||
| int | dataLen ) |
Load a compressed frame from a buffer.
| [in] | instance | The instance created using VMX_Create |
| [in] | data | The compressed frame data |
| [in] | dataLen | The length of the compressed frame data in bytes. |
| void VMX_ResetData | ( | VMX_SLICE_DATA * | s | ) |
| void VMX_ResetStream | ( | VMX_INSTANCE * | instance | ) |
| VMX_API int VMX_SaveTo | ( | VMX_INSTANCE * | instance, |
| BYTE * | dst, | ||
| int | maxLen ) |
Save a compressed frame to a buffer.
| [in] | instance | The instance created using VMX_Create |
| [in] | dst | The buffer to write to |
| [in] | maxLen | The maximum amount of data that can be written to the buffer. A buffer size of at least width*height*4 is recommended |
| VMX_API void VMX_SetEncodingParameters | ( | VMX_INSTANCE * | instance, |
| int | frameMin, | ||
| int | frameMax, | ||
| int | minQuality, | ||
| int | dcShift ) |
Set internal encoding parameters to apply from the next frame.
This can be used to fine tune encoding or set custom bitrate targets.
| [in] | instance | The instance created using VMX_Create |
| [in] | frameMin | If an encoded frame falls below this value, quality will be increased for next frame |
| [in] | frameMax | If an encoded frame is over this value, quality will be decreased for the next frame |
| [in] | minQuality | The quality will not fall below this value regardless of resulting bitrate |
| [in] | dcShift | Determines the DC precision where 0= 11bit, 1 = 10bit, 2= 9bit, 3= 8bit |
| VMX_API void VMX_SetQuality | ( | VMX_INSTANCE * | instance, |
| int | q ) |
Set the quality to use for the next frame.
If set just before encoding a frame, will override the bitrate targeting.
| [in] | instance | The instance created using VMX_Create |
| [in] | q | The quality value in the range of 0 (lowest quality) to 100 (highest quality). |
| VMX_API void VMX_SetThreads | ( | VMX_INSTANCE * | instance, |
| int | numThreads ) |
Set the number of threads for encoding/decoding.
| [in] | instance | The instance created using VMX_Create |
| [in] | numThreads | The number of threads to use. <= 0 is invalid and ignored. |
| VMX_API int VMX_Test | ( | VMX_INSTANCE * | instance, |
| short * | src, | ||
| short * | dst ) |
| const int VMX_DECODE_MATRIX_COUNT = 64 |
| const int VMX_ENCODE_MATRIX_COUNT = 192 |
| const int VMX_MAX_PLANES = 4 |
| const int VMX_QUALITY_COUNT = 25 |
| const int VMX_SLICE_HEIGHT = 16 |