📄 mediatype.h
字号:
#ifndef __MEDIATYPE_H__
#define __MEDIATYPE_H__
//-----------------------
// FOURCC codes supported
//-----------------------
#define MAKE_FOURCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch0)|((DWORD)(BYTE)(ch1)<<8)|((DWORD)(BYTE)(ch2)<<16)|((DWORD)(BYTE)(ch3)<<24))
// planar formats
#define FOURCC_I420 MAKE_FOURCC('I','4','2','0')
#if 0 // defined in ddgep.h"
#define FOURCC_YV12 MAKE_FOURCC('Y','V','1','2')
#endif
// packed formats
#define FOURCC_YUYV (FOURCC_YUYV422) // Windows Mobile have "~422" suffix in "ddgpe.h"
#define FOURCC_YUY2 (FOURCC_YUY2422) // Windows Mobile have "~422" suffix in "ddgpe.h"
#define FOURCC_UYVY (FOURCC_UYVY422) // Windows Mobile have "~422" suffix in "ddgpe.h"
#define FOURCC_YVYU MAKE_FOURCC('Y','V','Y','U') // YCrYCb
#define FOURCC_VYUY MAKE_FOURCC('V','Y','U','Y') // CrYCbY
//-------------------------------
// EDDGPEPixelFormat Custom Format
//-------------------------------
#define ddgpePixelFormat_I420 (ddgpePixelFormat_CustomFormat + 1)
#if 0 // defined in ddgep.h"
#define ddgpePixelFormat_YV12 (ddgpePixelFormat_CustomFormat + 2)
#endif
#define ddgpePixelFormat_YUYV (ddgpePixelFormat_YUYV422) // Windows Mobile have "~422" suffix in "ddgpe.h"
#define ddgpePixelFormat_UYVY (ddgpePixelFormat_UYVY422) // Windows Mobile have "~422" suffix in "ddgpe.h"
#define ddgpePixelFormat_YUY2 (ddgpePixelFormat_YUY2422) // Windows Mobile have "~422" suffix in "ddgpe.h"
#define ddgpePixelFormat_YVYU (ddgpePixelFormat_CustomFormat + 3)
#define ddgpePixelFormat_VYUY (ddgpePixelFormat_CustomFormat + 4)
//-------------------------------------------
// Surface Detection Macros (defined in ddgpepriv.h)
//-------------------------------------------
#define IsRGB1555(ppixelFormat) \
( \
((ppixelFormat)->dwRGBAlphaBitMask == 0x8000) && \
((ppixelFormat)->dwRBitMask == 0x7c00) && \
((ppixelFormat)->dwGBitMask == 0x03e0) && \
((ppixelFormat)->dwBBitMask == 0x001f) && \
(1))
#define IsRGB0555(ppixelFormat) \
( \
((ppixelFormat)->dwRGBAlphaBitMask == 0x0000) && \
((ppixelFormat)->dwRBitMask == 0x7c00) && \
((ppixelFormat)->dwGBitMask == 0x03e0) && \
((ppixelFormat)->dwBBitMask == 0x001f) && \
(1))
#define IsRGB565(ppixelFormat) \
( \
((ppixelFormat)->dwRGBAlphaBitMask == 0x0000) && \
((ppixelFormat)->dwRBitMask == 0xf800) && \
((ppixelFormat)->dwGBitMask == 0x07e0) && \
((ppixelFormat)->dwBBitMask == 0x001f) && \
(1))
#define IsRGB4444(ppixelFormat) \
( \
((ppixelFormat)->dwRGBAlphaBitMask == 0xf000) && \
((ppixelFormat)->dwRBitMask == 0x0f00) && \
((ppixelFormat)->dwGBitMask == 0x00f0) && \
((ppixelFormat)->dwBBitMask == 0x000f) && \
(1))
#define IsRGB0888(ppixelFormat) \
( \
((ppixelFormat)->dwRGBAlphaBitMask == 0x00000000) && \
((ppixelFormat)->dwRBitMask == 0x00ff0000) && \
((ppixelFormat)->dwGBitMask == 0x0000ff00) && \
((ppixelFormat)->dwBBitMask == 0x000000ff) && \
(1))
#define IsRGB8888(ppixelFormat) \
( \
((ppixelFormat)->dwRGBAlphaBitMask == 0xff000000) && \
((ppixelFormat)->dwRBitMask == 0x00ff0000) && \
((ppixelFormat)->dwGBitMask == 0x0000ff00) && \
((ppixelFormat)->dwBBitMask == 0x000000ff) && \
(1))
#endif // __MEDIATYPE_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -