MWCapture SDK Mac  3.3.0.12920
Macros | Functions
Color Formats

Macros

#define MWFOURCC_UNK   MWFOURCC('U', 'N', 'K', 'N')
 Unknown color formate. More...
 
#define MWFOURCC_GREY   MWFOURCC('G', 'R', 'E', 'Y')
 8bits Grey More...
 
#define MWFOURCC_Y800   MWFOURCC('Y', '8', '0', '0')
 8bits Grey More...
 
#define MWFOURCC_Y8   MWFOURCC('Y', '8', ' ', ' ')
 8bits Grey More...
 
#define MWFOURCC_Y16   MWFOURCC('Y', '1', '6', ' ')
 16bits Grey More...
 
#define MWFOURCC_RGB15   MWFOURCC('R', 'G', 'B', '5')
 16bits R5G5B5A1 More...
 
#define MWFOURCC_RGB16   MWFOURCC('R', 'G', 'B', '6')
 16bits R5G6B5 More...
 
#define MWFOURCC_RGB24   MWFOURCC('R', 'G', 'B', ' ')
 24bits R8G8B8 More...
 
#define MWFOURCC_RGBA   MWFOURCC('R', 'G', 'B', 'A')
 32bits R8G8B8A8 More...
 
#define MWFOURCC_ARGB   MWFOURCC('A', 'R', 'G', 'B')
 32bits A8R8G8B8 More...
 
#define MWFOURCC_BGR15   MWFOURCC('B', 'G', 'R', '5')
 16bits B5G5R5A1 More...
 
#define MWFOURCC_BGR16   MWFOURCC('B', 'G', 'R', '6')
 16bits B5G6R5 More...
 
#define MWFOURCC_BGR24   MWFOURCC('B', 'G', 'R', ' ')
 24bits B8G8R8 More...
 
#define MWFOURCC_BGRA   MWFOURCC('B', 'G', 'R', 'A')
 32bits B8G8R8A8 More...
 
#define MWFOURCC_ABGR   MWFOURCC('A', 'B', 'G', 'R')
 32bits A8B8G8R8 More...
 
#define MWFOURCC_NV16   MWFOURCC('N', 'V', '1', '6')
 NV16. More...
 
#define MWFOURCC_NV61   MWFOURCC('N', 'V', '6', '1')
 NV61. More...
 
#define MWFOURCC_I422   MWFOURCC('I', '4', '2', '2')
 I422. More...
 
#define MWFOURCC_YV16   MWFOURCC('Y', 'V', '1', '6')
 YV16. More...
 
#define MWFOURCC_YUY2   MWFOURCC('Y', 'U', 'Y', '2')
 YUY2. More...
 
#define MWFOURCC_YUYV   MWFOURCC('Y', 'U', 'Y', 'V')
 YUYV. More...
 
#define MWFOURCC_UYVY   MWFOURCC('U', 'Y', 'V', 'Y')
 UYVY. More...
 
#define MWFOURCC_YVYU   MWFOURCC('Y', 'V', 'Y', 'U')
 YVYU. More...
 
#define MWFOURCC_VYUY   MWFOURCC('V', 'Y', 'U', 'Y')
 VYUY. More...
 
#define MWFOURCC_I420   MWFOURCC('I', '4', '2', '0')
 I420. More...
 
#define MWFOURCC_IYUV   MWFOURCC('I', 'Y', 'U', 'V')
 IYUV. More...
 
#define MWFOURCC_NV12   MWFOURCC('N', 'V', '1', '2')
 NV12. More...
 
#define MWFOURCC_YV12   MWFOURCC('Y', 'V', '1', '2')
 YV12. More...
 
#define MWFOURCC_NV21   MWFOURCC('N', 'V', '2', '1')
 NV21. More...
 
#define MWFOURCC_P010   MWFOURCC('P', '0', '1', '0')
 P010. More...
 
#define MWFOURCC_P210   MWFOURCC('P', '2', '1', '0')
 P210. More...
 
#define MWFOURCC_IYU2   MWFOURCC('I', 'Y', 'U', '2')
 IYU2. More...
 
#define MWFOURCC_V308   MWFOURCC('v', '3', '0', '8')
 V308. More...
 
#define MWFOURCC_AYUV   MWFOURCC('A', 'Y', 'U', 'V')
 AYUV. More...
 
#define MWFOURCC_UYVA   MWFOURCC('U', 'Y', 'V', 'A')
 UYVA. More...
 
#define MWFOURCC_V408   MWFOURCC('v', '4', '0', '8')
 V408. More...
 
#define MWFOURCC_VYUA   MWFOURCC('V', 'Y', 'U', 'A')
 VYUA. More...
 
#define MWFOURCC_V210   MWFOURCC('v', '2', '1', '0')
 
#define MWFOURCC_Y410   MWFOURCC('Y', '4', '1', '0')
 Y410. More...
 
#define MWFOURCC_V410   MWFOURCC('v', '4', '1', '0')
 V410. More...
 
#define MWFOURCC_RGB10   MWFOURCC('R', 'G', '1', '0')
 RGB10. More...
 
#define MWFOURCC_BGR10   MWFOURCC('B', 'G', '1', '0')
 BGR10. More...
 

Functions

BOOLEAN FOURCC_IsRGB (DWORD dwFOURCC)
 Determines whether the color format is RGB. More...
 
BOOLEAN FOURCC_IsPacked (DWORD dwFOURCC)
 Determines whether the color format is packed. More...
 
int FOURCC_GetBpp (DWORD dwFOURCC)
 Gets the bits that pixel of color format takes. More...
 
DWORD FOURCC_CalcMinStride (DWORD dwFOURCC, int cx, DWORD dwAlign)
 Counts the number of bytes that a line data of image takes, depending on the width of image and the color format. More...
 
DWORD FOURCC_CalcImageSize (DWORD dwFOURCC, int cx, int cy, DWORD cbStride)
 Counts the number of bytes that a frame takes, depending on the color format, resolution and the line width. More...
 
BOOLEAN FOURCC_IsMask (const DWORD *pdwMasks, DWORD dwRedMask, DWORD dwGreenMask, DWORD dwBlueMask)
 Determins whether the mask is the same as specified color format. More...
 
DWORD FOURCC_GetFromBitmapHeader (DWORD biCompression, WORD biBitCount, DWORD *pdwMasks)
 Gets color format from the bitmap header. More...
 
DWORD FOURCC_GetFromBitmapHeader2 (const MWCAP_BITMAPINFOHEADER *pbmih)
 Gets color format from the bitmap header. More...
 

Detailed Description

Macro Definition Documentation

◆ MWFOURCC_ABGR

#define MWFOURCC_ABGR   MWFOURCC('A', 'B', 'G', 'R')

32bits A8B8G8R8

32bits A8B8G8R8
4 bytes per pixel, A takes 8bits, B takes 8bits, G takes 8bits, R takes 8bits
Data structure:
[A8, B8, G8, R8],[A8, B8, G8, R8] ...
...

◆ MWFOURCC_ARGB

#define MWFOURCC_ARGB   MWFOURCC('A', 'R', 'G', 'B')

32bits A8R8G8B8

32bits A8R8G8B8
4 bytes per pixel, R takes 8bits, G takes 8bits, B takes 8bits, A takes 8bits
Data structure:
[A8, R8, G8, B8],[A8, R8, G8, B8] ...
...

◆ MWFOURCC_AYUV

#define MWFOURCC_AYUV   MWFOURCC('A', 'Y', 'U', 'V')

AYUV.

Packed YUV 8bits 4:4:4 (32bits)
A single pixel takes 4 bytes.
Data structure:
[A00 Y00 U00 V00][A01 Y01 U01 V01][A02 Y02 U02 V02][A03 Y03 U03 V03] ...
[A10 Y10 U10 V10][A11 Y11 U11 V11][A12 Y12 U12 V12][A13 Y13 U13 V13] ...
[A20 Y20 U20 V20][A21 Y21 U21 V21][A22 Y22 U22 V22][A23 Y23 U23 V23] ...
[A30 Y30 U30 V30][A31 Y31 U31 V31][A32 Y32 U32 V32][A33 Y33 U33 V33] ...
...

◆ MWFOURCC_BGR10

#define MWFOURCC_BGR10   MWFOURCC('B', 'G', '1', '0')

BGR10.

Packed BGR 10bits (32bits B10G10R10A2)
A single pixel takes 4 bytes.
Data structure:
[B00 G00 R00 A00 (B10G10R10A2)][B01 G01 R01 A01 (B10G10R10A2)][B02 G02 R02 A02 (B10G10R10A2)][B03 G03 R03 A03 (B10G10R10A2)] ...
...

◆ MWFOURCC_BGR15

#define MWFOURCC_BGR15   MWFOURCC('B', 'G', 'R', '5')

16bits B5G5R5A1

16bits B5G5R5A1
2 bytes per pixel, B takes 5bits, G takes 5bits, R takes 5bits, A takes 1bits
Data structure:
[B5, G5, R5, A1],[B5, G5, R5, A1] ...
...

◆ MWFOURCC_BGR16

#define MWFOURCC_BGR16   MWFOURCC('B', 'G', 'R', '6')

16bits B5G6R5

16bits B5G6R5
2 bytes per pixel, B takes 5bits, G takes 6bits, R takes 5bits
Data structure:
[B5, G6, R5],[B5, G6, R5] ...
...

◆ MWFOURCC_BGR24

#define MWFOURCC_BGR24   MWFOURCC('B', 'G', 'R', ' ')

24bits B8G8R8

24bits B8G8R8
3 bytes per pixel, B takes 8bits, G takes 8bits, R takes 8bits
Data structure:
[B8, G8, R8],[B8, G8, R8] ...
...

◆ MWFOURCC_BGRA

#define MWFOURCC_BGRA   MWFOURCC('B', 'G', 'R', 'A')

32bits B8G8R8A8

32bits B8G8R8A8
4 bytes per pixel, B takes 8bits, G takes 8bits, R takes 8bits, A takes 8bits
Data structure:
[B8, G8, R8, A8],[B8, G8, R8, A8] ...
...

◆ MWFOURCC_GREY

#define MWFOURCC_GREY   MWFOURCC('G', 'R', 'E', 'Y')

8bits Grey

8bits Grey
1 byte per pixel
Data structure:
[Y0], [Y1], [Y2], ...
...

◆ MWFOURCC_I420

#define MWFOURCC_I420   MWFOURCC('I', '4', '2', '0')

I420.

YUV 8bits 4:2:0 planar (12bits)
A single pixel of the image takes 12bits.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[U00][U01] ...
[U10][U11] ...
...
[V00][V01] ...
[V10][V11] ...
...
Converts to YUV data as: [Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
[Y10 U00 V00][Y11 U00 V00][Y12 U01 V01][Y13 U01 V01] ...
[Y20 U10 V10][Y21 U10 V10][Y22 U11 V11][Y23 U11 V11] ...
[Y30 U10 V10][Y31 U10 V10][Y32 U11 V11][Y33 U11 V11] ...
...

◆ MWFOURCC_I422

#define MWFOURCC_I422   MWFOURCC('I', '4', '2', '2')

I422.

YUV 8bits 4:2:2 plannar (16bits)
2 byte per pixel. All Y/U/V data is in one plane respectively.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[U00][U01] ...
[U10][U11] ...
[U20][U21] ...
[U30][U31] ...
...
[V00][V01] ...
[V10][V11] ...
[V20][V21] ...
[V30][V31] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
...

◆ MWFOURCC_IYU2

#define MWFOURCC_IYU2   MWFOURCC('I', 'Y', 'U', '2')

IYU2.

Packed YUV 8bits 4:4:4 (24bits)
A single pixel takes 3 bytes.
Data structure:
[U00 Y00 V00][U01 Y01 V01][U02 Y02 V02][U03 Y03 V03] ...
[U10 Y10 V10][U11 Y11 V11][U12 Y12 V12][U13 Y13 V13] ...
[U20 Y20 V20][U21 Y21 V21][U22 Y22 V22][U23 Y23 V23] ...
[U30 Y30 V30][U31 Y31 V31][U32 Y32 V32][U33 Y33 V33] ...
...

◆ MWFOURCC_IYUV

#define MWFOURCC_IYUV   MWFOURCC('I', 'Y', 'U', 'V')

IYUV.

YUV 8bits 4:2:0 planar (12bits); the same as MWFOURCC_I420
A single pixel of the image takes 12bits.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[U00][U01] ...
[U10][U11] ...
...
[V00][V01] ...
[V10][V11] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
[Y10 U00 V00][Y11 U00 V00][Y12 U01 V01][Y13 U01 V01] ...
[Y20 U10 V10][Y21 U10 V10][Y22 U11 V11][Y23 U11 V11] ...
[Y30 U10 V10][Y31 U10 V10][Y32 U11 V11][Y33 U11 V11] ...
...

◆ MWFOURCC_NV12

#define MWFOURCC_NV12   MWFOURCC('N', 'V', '1', '2')

NV12.

YUV 8bits 4:2:0 semi-planar (12bits)
A single pixel of the image takes 12bits.
All Y data is in one plane, all UV data is in one plane.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[U00 V00][U01 V01] ...
[U10 V10][U11 V11] ...
...
Converts to YUV data as: [Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
[Y10 U00 V00][Y11 U00 V00][Y12 U01 V01][Y13 U01 V01] ...
[Y20 U10 V10][Y21 U10 V10][Y22 U11 V11][Y23 U11 V11] ...
[Y30 U10 V10][Y31 U10 V10][Y32 U11 V11][Y33 U11 V11] ...
...

◆ MWFOURCC_NV16

#define MWFOURCC_NV16   MWFOURCC('N', 'V', '1', '6')

NV16.

YUV 8bits 4:2:2 semi-planar(16bits)
2 byte per pixel, all Y data in one plane, all UV data in one plane
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[U00 V00][U01 V01] ...
[U10 V10][U11 V11] ...
[U20 V20][U21 V21] ...
[U30 V30][U31 V31] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
...

◆ MWFOURCC_NV21

#define MWFOURCC_NV21   MWFOURCC('N', 'V', '2', '1')

NV21.

YUV 8bits 4:2:0 semi-planar (12bits)
A single pixel of the image takes 12bits.
All Y data is in one plane, all UV data is in one plane.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[V00 U00][V01 U01] ...
[V10 U10][V11 U11] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
[Y10 U00 V00][Y11 U00 V00][Y12 U01 V01][Y13 U01 V01] ...
[Y20 U10 V10][Y21 U10 V10][Y22 U11 V11][Y23 U11 V11] ...
[Y30 U10 V10][Y31 U10 V10][Y32 U11 V11][Y33 U11 V11] ...
...

◆ MWFOURCC_NV61

#define MWFOURCC_NV61   MWFOURCC('N', 'V', '6', '1')

NV61.

YUV 8bits 4:2:2 semi-planar (16bits)
2 byte per pixel, all Y data in one plane, all UV data in one plane
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[V00 U00][V01 U01] ...
[V10 U10][V11 U11] ...
[V20 U20][V21 U21] ...
[V30 U30][V31 U31] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
...

◆ MWFOURCC_P010

#define MWFOURCC_P010   MWFOURCC('P', '0', '1', '0')

P010.

YUV 10bits 4:2:0 semi-planar(24bits)
A single pixel takes 3 bytes.
All Y data is in one plane, all UV data is in one plane.
Data structure:
[Y00(Y10bits)][Y01(Y10bits)][Y02(Y10bits)][Y03(Y10bits)] ...
[Y10(Y10bits)][Y11(Y10bits)][Y12(Y10bits)][Y13(Y10bits)] ...
[Y20(Y10bits)][Y21(Y10bits)][Y22(Y10bits)][Y23(Y10bits)] ...
[Y30(Y10bits)][Y31(Y10bits)][Y32(Y10bits)][Y33(Y10bits)] ...
...
[U00(U10bits) V00(V10bits)][U01(U10bits) V01(V10bits)] ...
[U10(U10bits) V10(V10bits)][U11(U10bits) V11(V10bits)] ...
...
Converts to YUV data as:
[Y00(Y10bits) U00(U10bits) V00(V10bits)][Y01(Y10bits) U00(U10bits) V00(V10bits)][Y02(Y10bits) U01(U10bits) V01(V10bits)][Y03(Y10bits) U01(U10bits) V01(V10bits)] ...
[Y10(Y10bits) U00(U10bits) V00(V10bits)][Y11(Y10bits) U00(U10bits) V00(V10bits)][Y12(Y10bits) U01(U10bits) V01(V10bits)][Y13(Y10bits) U01(U10bits) V01(V10bits)] ...
[Y20(Y10bits) U10(U10bits) V10(V10bits)][Y21(Y10bits) U10(U10bits) V10(V10bits)][Y22(Y10bits) U11(U10bits) V11(V10bits)][Y23(Y10bits) U11(U10bits) V11(V10bits)] ...
[Y30(Y10bits) U10(U10bits) V10(V10bits)][Y31(Y10bits) U10(U10bits) V10(V10bits)][Y32(Y10bits) U11(U10bits) V11(V10bits)][Y33(Y10bits) U11(U10bits) V11(V10bits)] ...
...

◆ MWFOURCC_P210

#define MWFOURCC_P210   MWFOURCC('P', '2', '1', '0')

P210.

YUV 10bits 4:2:2 semi-planar (32bits)
A single pixel takes 4 bytes.
All Y data is in one plane, all UV data is in one plane.
Data structure:
[Y00(Y10bits)][Y01(Y10bits)][Y02(Y10bits)][Y03(Y10bits)] ...
[Y10(Y10bits)][Y11(Y10bits)][Y12(Y10bits)][Y13(Y10bits)] ...
[Y20(Y10bits)][Y21(Y10bits)][Y22(Y10bits)][Y23(Y10bits)] ...
[Y30(Y10bits)][Y31(Y10bits)][Y32(Y10bits)][Y33(Y10bits)] ...
...
[U00(U10bits) V00(V10bits)][U01(U10bits) V01(V10bits)] ...
[U10(U10bits) V10(V10bits)][U11(U10bits) V11(V10bits)] ...
[U20(U10bits) V20(V10bits)][U21(U10bits) V21(V10bits)] ...
[U30(U10bits) V30(V10bits)][U31(U10bits) V31(V10bits)] ...
...
Converts to YUV data as:
[Y00(Y10bits) U00(U10bits) V00(V10bits)][Y01(Y10bits) U00(U10bits) V00(V10bits)][Y02(Y10bits) U01(U10bits) V01(V10bits)][Y03(Y10bits) U01(U10bits) V01(V10bits)] ...
[Y10(Y10bits) U10(U10bits) V10(V10bits)][Y11(Y10bits) U10(U10bits) V10(V10bits)][Y12(Y10bits) U11(U10bits) V11(V10bits)][Y13(Y10bits) U11(U10bits) V11(V10bits)] ...
[Y20(Y10bits) U20(U10bits) V20(V10bits)][Y21(Y10bits) U20(U10bits) V20(V10bits)][Y22(Y10bits) U21(U10bits) V21(V10bits)][Y23(Y10bits) U21(U10bits) V21(V10bits)] ...
[Y30(Y10bits) U30(U10bits) V30(V10bits)][Y31(Y10bits) U30(U10bits) V30(V10bits)][Y32(Y10bits) U31(U10bits) V31(V10bits)][Y33(Y10bits) U31(U10bits) V31(V10bits)] ...
...

◆ MWFOURCC_RGB10

#define MWFOURCC_RGB10   MWFOURCC('R', 'G', '1', '0')

RGB10.

Packed RGB 10bits (32bits R10G10B10A2)
A single pixel takes 4 bytes.
Data structure:
[R00 G00 B00 A00 (R10G10B10A2)][R01 G01 B01 A01 (R10G10B10A2)][R02 G02 B02 A02 (R10G10B10A2)][R03 G03 B03 A03 (R10G10B10A2)] ...
...

◆ MWFOURCC_RGB15

#define MWFOURCC_RGB15   MWFOURCC('R', 'G', 'B', '5')

16bits R5G5B5A1

16bits R5G5B5A1
2 bytes per pixel, R takes 5bits, G takes 5bits, B takes 5bits, A takes 1bit
Data structure:
[R5, G5, B5, A1], ...
...

◆ MWFOURCC_RGB16

#define MWFOURCC_RGB16   MWFOURCC('R', 'G', 'B', '6')

16bits R5G6B5

16bits R5G6B5
2 bytes per pixel, R takes 5bits, G takes 5bits, B takes 5bits, A takes 1bit
Data structure:
[R5, G6, B5],[R5, G6, B5] ...
...

◆ MWFOURCC_RGB24

#define MWFOURCC_RGB24   MWFOURCC('R', 'G', 'B', ' ')

24bits R8G8B8

24bits R8G8B8
3 bytes per pixel, R takes 8bits, G takes 8bits, B takes 8bits
Data structure:
[R8, G8, B8],[R8, G8, B8] ...
...

◆ MWFOURCC_RGBA

#define MWFOURCC_RGBA   MWFOURCC('R', 'G', 'B', 'A')

32bits R8G8B8A8

32bits R8G8B8A8
4 bytes per pixel, R takes 8bits, G takes 8bits, B takes 8bits, A takes 8bits
Data structure:
[R8, G8, B8, A8],[R8, G8, B8, A8] ...
...

◆ MWFOURCC_UNK

#define MWFOURCC_UNK   MWFOURCC('U', 'N', 'K', 'N')

Unknown color formate.

Unknown color formate

◆ MWFOURCC_UYVA

#define MWFOURCC_UYVA   MWFOURCC('U', 'Y', 'V', 'A')

UYVA.

Packed YUV 8bits 4:4:4 (32bits)
A single pixel takes 4 bytes.
Data structure:
[U00 Y00 V00 A00][U01 Y01 V01 A01][U02 Y02 V02 A02][U03 Y03 V03 A03] ...
[U10 Y10 V10 A10][U11 Y11 V11 A11][U12 Y12 V12 A12][U13 Y13 V13 A13] ...
[U20 Y20 V20 A20][U21 Y21 V21 A21][U22 Y22 V22 A22][U23 Y23 V23 A23] ...
[U30 Y30 V30 A30][U31 Y31 V31 A31][U32 Y32 V32 A32][U33 Y33 V33 A33] ...
...

◆ MWFOURCC_UYVY

#define MWFOURCC_UYVY   MWFOURCC('U', 'Y', 'V', 'Y')

UYVY.

Packed YUV 8bits 4:2:2 (16bits)
2 byte per pixel. 2 pixels as a base unit.
Data structure:
{[U00 Y00][V01 Y01]} {[U02 Y02][V03 Y03]} ...
...
Converts to YUV data as:
[Y00 U00 V01][Y01 U00 V01][Y02 U02 V03][Y03 U02 V03] ...
...

◆ MWFOURCC_V210

#define MWFOURCC_V210   MWFOURCC('v', '2', '1', '0')

@vrief V210

Packed YUV 10bit 4:2:2 (24bits)
2 byte per pixel
Data structure is:
[2'b00 V00 Y00 U00][2'b00 Y02 U01 Y01][2'b00 U02 Y03 V01][2'b00 Y05 V02 Y04] ...
[2'b00 V10 Y10 U10][2'b00 Y12 U11 Y11][2'b00 U12 Y13 V11][2'b00 Y15 V12 Y14] ...
[2'b00 V20 Y20 U20][2'b00 Y22 U21 Y21][2'b00 U22 Y23 V21][2'b00 Y25 V22 Y24] ...
[2'b00 V30 Y30 U30][2'b00 Y32 U31 Y31][2'b00 U32 Y33 V31][2'b00 Y35 V32 Y34] ...
...

◆ MWFOURCC_V308

#define MWFOURCC_V308   MWFOURCC('v', '3', '0', '8')

V308.

Packed YUV 8bits 4:4:4 (24bits)
A single pixel takes 3 bytes.
Data structure:
[V00 Y00 U00][V01 Y01 U01][V02 Y02 U02][V03 Y03 U03] ...
[V10 Y10 U10][V11 Y11 U11][V12 Y12 U12][V13 Y13 U13] ...
[V20 Y20 U20][V21 Y21 U21][V22 Y22 U22][V23 Y23 U23] ...
[V30 Y30 U30][V31 Y31 U31][V32 Y32 U32][V33 Y33 U33] ...
...

◆ MWFOURCC_V408

#define MWFOURCC_V408   MWFOURCC('v', '4', '0', '8')

V408.

Packed YUV 8bits 4:4:4 (32bits); the same as MWFOURCC_UYVA
A single pixel takes 4 bytes.
Data structure:
[U00 Y00 V00 A00][U01 Y01 V01 A01][U02 Y02 V02 A02][U03 Y03 V03 A03] ...
[U10 Y10 V10 A10][U11 Y11 V11 A11][U12 Y12 V12 A12][U13 Y13 V13 A13] ...
[U20 Y20 V20 A20][U21 Y21 V21 A21][U22 Y22 V22 A22][U23 Y23 V23 A23] ...
[U30 Y30 V30 A30][U31 Y31 V31 A31][U32 Y32 V32 A32][U33 Y33 V33 A33] ...
...

◆ MWFOURCC_V410

#define MWFOURCC_V410   MWFOURCC('v', '4', '1', '0')

V410.

Packed YUV 10bits 4:4:4 (32bits Y10U10V10A2)
A single pixel takes 4 bytes.
Data structure:
[A00 U00 Y00 V00 (A2U10Y10V10)][A01 U01 Y01 V01 (A2U10Y10V10)][A02 U02 Y02 V02 (A2U10Y10V10)][A03 U03 Y03 V03 (A2U10Y10V10)] ...
[A10 U10 Y10 V10 (A2U10Y10V10)][A11 U11 Y11 V11 (A2U10Y10V10)][A12 U12 Y12 V12 (A2U10Y10V10)][A13 U13 Y13 V13 (A2U10Y10V10)] ...
[A20 U20 Y20 V20 (A2U10Y10V10)][A21 U21 Y21 V21 (A2U10Y10V10)][A22 U22 Y22 V22 (A2U10Y10V10)][A23 U23 Y23 V23 (A2U10Y10V10)] ...
[A30 U30 Y30 V30 (A2U10Y10V10)][A31 U31 Y31 V31 (A2U10Y10V10)][A32 U32 Y32 V32 (A2U10Y10V10)][A33 U33 Y33 V33 (A2U10Y10V10)] ...
...

◆ MWFOURCC_VYUA

#define MWFOURCC_VYUA   MWFOURCC('V', 'Y', 'U', 'A')

VYUA.

Packed YUV 8bits 4:4:4 (32bits)
A single pixel takes 4 bytes.
Data structure:
[V00 Y00 U00 A00][V01 Y01 U01 A01][V02 Y02 U02 A02][V03 Y03 U03 A03] ...
[V10 Y10 U10 A10][V11 Y11 U11 A11][V12 Y12 U12 A12][V13 Y13 U13 A13] ...
[V20 Y20 U20 A20][V21 Y21 U21 A21][V22 Y22 U22 A22][V23 Y23 U23 A23] ...
[V30 Y30 U30 A30][V31 Y31 U31 A31][V32 Y32 U32 A32][V33 Y33 U33 A33] ...
...

◆ MWFOURCC_VYUY

#define MWFOURCC_VYUY   MWFOURCC('V', 'Y', 'U', 'Y')

VYUY.

Packed YUV 8bits 4:2:2 (16bits)
2 byte per pixel. 2 pixels as a base unit.
Data structure:
{[V00 Y00][U01 Y01]} {[V02 Y02][U03 Y03]} ...
...
Converts to YUV data as:
[Y00 U01 V00][Y01 U01 V00][Y02 U03 V02][Y03 U03 V02] ...
...

◆ MWFOURCC_Y16

#define MWFOURCC_Y16   MWFOURCC('Y', '1', '6', ' ')

16bits Grey

16bits Grey
2 bytes per pixel
Data structure:
[Y0], [Y1], [Y2], ...
...

◆ MWFOURCC_Y410

#define MWFOURCC_Y410   MWFOURCC('Y', '4', '1', '0')

Y410.

Packed YUV 10bits 4:4:4 (32bits Y10U10V10A2)
A single pixel takes 4 bytes.
Data structure:
[U00 Y00 V00 A00 (U10Y10V10A2)][U01 Y01 V01 A01 (U10Y10V10A2)][U02 Y02 V02 A02 (U10Y10V10A2)][U03 Y03 V03 A03 (U10Y10V10A2)] ...
[U10 Y10 V10 A10 (U10Y10V10A2)][U11 Y11 V11 A11 (U10Y10V10A2)][U12 Y12 V12 A12 (U10Y10V10A2)][U13 Y13 V13 A13 (U10Y10V10A2)] ...
[U20 Y20 V20 A20 (U10Y10V10A2)][U21 Y21 V21 A21 (U10Y10V10A2)][U22 Y22 V22 A22 (U10Y10V10A2)][U23 Y23 V23 A23 (U10Y10V10A2)] ...
[U30 Y30 V30 A30 (U10Y10V10A2)][U31 Y31 V31 A31 (U10Y10V10A2)][U32 Y32 V32 A32 (U10Y10V10A2)][U33 Y33 V33 A33 (U10Y10V10A2)] ...
...

◆ MWFOURCC_Y8

#define MWFOURCC_Y8   MWFOURCC('Y', '8', ' ', ' ')

8bits Grey

8bits Grey; the same as MWFOURCC_GREY
1 byte per pixel
Data structure:
[Y0], [Y1], [Y2], ...
...

◆ MWFOURCC_Y800

#define MWFOURCC_Y800   MWFOURCC('Y', '8', '0', '0')

8bits Grey

8bits Grey; the same as MWFOURCC_GREY
1 byte per pixel
Data structure:
[Y0], [Y1], [Y2], ...
...

◆ MWFOURCC_YUY2

#define MWFOURCC_YUY2   MWFOURCC('Y', 'U', 'Y', '2')

YUY2.

Packed YUV 8bits 4:2:2 (16bits)
2 byte per pixel. 2 pixels as a base unit.
Data structure:
{[Y00 U00][Y01 V01]} {[Y02 U02][Y03 V03]} ...
...
Converts to YUV data as:
[Y00 U00 V01][Y01 U00 V01][Y02 U02 V03][Y03 U02 V03] ...
...

◆ MWFOURCC_YUYV

#define MWFOURCC_YUYV   MWFOURCC('Y', 'U', 'Y', 'V')

YUYV.

Packed YUV 8bits 4:2:2 (16bits); the same as MWFOURCC_YUY2
2 byte per pixel. 2 pixels as a base unit.
Data structure:
{[Y00 U00][Y01 V01]} {[Y02 U02][Y03 V03]} ...
...
Converts to YUV data as:
[Y00 U00 V01][Y01 U00 V01][Y02 U02 V03][Y03 U02 V03] ...
...

◆ MWFOURCC_YV12

#define MWFOURCC_YV12   MWFOURCC('Y', 'V', '1', '2')

YV12.

YUV 8bits 4:2:0 planar (12bits)
A single pixel of the image takes 12bits.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[V00][V01] ...
[V10][V11] ...
...
[U00][U01] ...
[U10][U11] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
[Y10 U00 V00][Y11 U00 V00][Y12 U01 V01][Y13 U01 V01] ...
[Y20 U10 V10][Y21 U10 V10][Y22 U11 V11][Y23 U11 V11] ...
[Y30 U10 V10][Y31 U10 V10][Y32 U11 V11][Y33 U11 V11] ...
...

◆ MWFOURCC_YV16

#define MWFOURCC_YV16   MWFOURCC('Y', 'V', '1', '6')

YV16.

YUV 8bits 4:2:2 plannar (16bits)
2 byte per pixel. All Y/U/V data is in one plane respectively.
Data structure:
[Y00][Y01][Y02][Y03] ...
[Y10][Y11][Y12][Y13] ...
[Y20][Y21][Y22][Y23] ...
[Y30][Y31][Y32][Y33] ...
...
[V00][V01] ...
[V10][V11] ...
[V20][V21] ...
[V30][V31] ...
...
[U00][U01] ...
[U10][U11] ...
[U20][U21] ...
[U30][U31] ...
...
Converts to YUV data as:
[Y00 U00 V00][Y01 U00 V00][Y02 U01 V01][Y03 U01 V01] ...
...

◆ MWFOURCC_YVYU

#define MWFOURCC_YVYU   MWFOURCC('Y', 'V', 'Y', 'U')

YVYU.

Packed YUV 8bits 4:2:2 (16bits)
2 byte per pixel. 2 pixels as a base unit.
Data structure:
{[Y00 V00][Y01 U01]} {[Y02 V02][Y03 U03]} ...
...
Converts to YUV data as:
[Y00 U01 V00][Y01 U01 V00][Y02 U03 V02][Y03 U03 V02] ...
...

Function Documentation

◆ FOURCC_CalcImageSize()

DWORD FOURCC_CalcImageSize ( DWORD  dwFOURCC,
int  cx,
int  cy,
DWORD  cbStride 
)
inline

Counts the number of bytes that a frame takes, depending on the color format, resolution and the line width.

Parameters
[in]dwFOURCCColor format
[in]cxImage width
[in]cyImage height
[in]cbStrideThe bytes of line width
Returns
Returns the number of bytes that the image takes.

◆ FOURCC_CalcMinStride()

DWORD FOURCC_CalcMinStride ( DWORD  dwFOURCC,
int  cx,
DWORD  dwAlign 
)
inline

Counts the number of bytes that a line data of image takes, depending on the width of image and the color format.

Parameters
[in]dwFOURCCColor format
[in]cxWidth of a line
[in]dwAlignByte alignment
Returns
Returns the the number of bytes that a line data of image takes.

◆ FOURCC_GetBpp()

int FOURCC_GetBpp ( DWORD  dwFOURCC)
inline

Gets the bits that pixel of color format takes.

Parameters
[in]dwFOURCCcolor format
Returns
Returns the bits that pixel of color format takess

◆ FOURCC_GetFromBitmapHeader()

DWORD FOURCC_GetFromBitmapHeader ( DWORD  biCompression,
WORD  biBitCount,
DWORD *  pdwMasks 
)
inline

Gets color format from the bitmap header.

Parameters
[in]biCompressionBitmap compression format
[in]biBitCountColor bit counts
[in]pdwMasksColor mask
Returns
Returns the bitmap color format fits the mask.

◆ FOURCC_GetFromBitmapHeader2()

DWORD FOURCC_GetFromBitmapHeader2 ( const MWCAP_BITMAPINFOHEADER *  pbmih)
inline

Gets color format from the bitmap header.

Parameters
[in]pbmihBitmap header address
Returns
Returns the color format which fits the mask.

◆ FOURCC_IsMask()

BOOLEAN FOURCC_IsMask ( const DWORD *  pdwMasks,
DWORD  dwRedMask,
DWORD  dwGreenMask,
DWORD  dwBlueMask 
)
inline

Determins whether the mask is the same as specified color format.

Parameters
[in]pdwMasksColor format mask
[in]dwRedMaskRed mask
[in]dwGreenMaskGreen mask
[in]dwBlueMaskBlue mask
Returns
If the mask is the same as specified color format, it returns TRUE; otherwise, which returns FALSE.

◆ FOURCC_IsPacked()

BOOLEAN FOURCC_IsPacked ( DWORD  dwFOURCC)
inline

Determines whether the color format is packed.

Parameters
[in]dwFOURCCcolor format
Returns
If the color format is packed, which returns TRUE; otherwise returns FALSE.

◆ FOURCC_IsRGB()

BOOLEAN FOURCC_IsRGB ( DWORD  dwFOURCC)
inline

Determines whether the color format is RGB.

Parameters
[in]dwFOURCCcolor format
Returns
If the color format is RGB, which returns TRUE; otherwise returns FALSE.