Enum ndi::FourCCVideoType [−][src]
pub enum FourCCVideoType { UYVY, UYVA, P216, PA16, YV12, I420, NV12, BGRA, BGRX, RGBA, RGBX, }
Expand description
Variants
A buffer in the “UYVY” FourCC and represents a 4:2:2 image in YUV color space.
There is a Y sample at every pixel, and U and V sampled at every second pixel horizontally on each line. A macro-pixel contains 2 pixels in 1 DWORD. The ordering of these pixels is U0, Y0, V0, Y1.
A buffer that represents a 4:2:2:4 image in YUV color space.
There is a Y sample at every pixels with U,V sampled at every second pixel horizontally. There are two planes in memory, the first being the UYVY color plane, and the second the alpha plane that immediately follows the first. For instance, if you have an image with p_data and stride, then the planes are located as follows:
uint8_t *p_uyvy = (uint8_t*)p_data; uint8_t *p_alpha = p_uyvy + stride*yres;
A 4:2:2 buffer in semi-planar format with full 16bpp color precision.
This is formed from two buffers in memory, the first is a 16bpp luminance buffer and the second is a buffer of U,V pairs in memory. This can be considered as a 16bpp version of NV12.
For instance, if you have an image with p_data and stride, then the planes are located as follows:
uint16_t *p_y = (uint16_t*)p_data; uint16_t *p_uv = (uint16_t*)(p_data + stride*yres);
As a matter of illustration, a completely packed image would have stride as xres*sizeof(uint16_t)
.
A 4:2:2:4 buffer in semi-planar format with full 16bpp color and alpha precision.
This is formed from three buffers in memory. The first is a 16bpp luminance buffer, and the second is a buffer of U,V pairs in memory. A single plane alpha channel at 16bpp follows the U,V pairs.
For instance, if you have an image with p_data and stride, then the planes are located as follows:
uint16_t *p_y = (uint16_t*)p_data; uint16_t *p_uv = p_y + stride*yres; uint16_t *p_alpha = p_uv + stride*yres;
To illustrate, a completely packed image would have stride as xres*sizeof(uint16_t)
.
A planar 4:2:0 in Y, U, V planes in memory.
For instance, if you have an image with p_data and stride, then the planes are located as follows:
uint8_t *p_y = (uint8_t*)p_data; uint8_t *p_u = p_y + stride*yres; uint8_t *p_v = p_u + (stride/2)*(yres/2); As a matter of illustration, a completely packed image would have stride as `xres*sizeof(uint8_t)`.
A planar 4:2:0 in Y, U, V planes in memory with the U, V planes reversed from the YV12 format.
For instance, if you have an image with p_data and stride, then the planes are located as follows:
uint8_t *p_y = (uint8_t*)p_data; uint8_t *p_v = p_y + stride*yres; uint8_t *p_u = p_v + (stride/2)*(yres/2);
To illustrate, a completely packed image would have stride as xres*sizeof(uint8_t)
.
A semi planar 4:2:0 in Y, UV planes in memory.
The luminance plane is at the lowest memory address with the UV pairs immediately following them.
For instance, if you have an image with p_data and stride, then the planes are located as follows:
uint8_t *p_y = (uint8_t*)p_data; uint8_t *p_uv = p_y + stride*yres;
To illustrate, a completely packed image would have stride as xres*sizeof(uint8_t)
.
A 4:4:4:4, 8-bit image of red, green, blue and alpha components
in memory order blue, green, red, alpha. This data is not pre-multiplied.
A 4:4:4, 8-bit image of red, green, blue components in memory order blue, green, red, 255. This data is not pre-multiplied.
This is identical to BGRA, but is provided as a hint that all alpha channel values are 255, meaning that alpha compositing may be avoided. The lack of an alpha channel is used by the SDK to improve performance when possible.
A 4:4:4:4, 8-bit image of red, green, blue and alpha components
in memory order red, green, blue, alpha. This data is not pre-multiplied.
A 4:4:4, 8-bit image of red, green, blue components
in memory order red, green, blue, 255. This data is not pre-multiplied. This is identical to RGBA, but is provided as a hint that all alpha channel values are 255, meaning that alpha compositing may be avoided. The lack of an alpha channel is used by the SDK to improve performance when possible.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FourCCVideoType
impl Send for FourCCVideoType
impl Sync for FourCCVideoType
impl Unpin for FourCCVideoType
impl UnwindSafe for FourCCVideoType
Blanket Implementations
Mutably borrows from an owned value. Read more