📄 mp4vosd.h
字号:
#ifndef _MP4VOSD_H_#define _MP4VOSD_H_#ifdef LINUX #include "portab.h"#else #include "portab.h"#endif // avaiable format, start #define OSD_FMT_YUV 0 #define OSD_FMT_CbYCrY 1 #ifdef LINUX
// define MPEG4 osd output format, select from the following avaiable format
#ifdef OUTPUT_OSD_FORMAT_YUV
#define OSD_IMG_FORMAT OSD_FMT_YUV
#elif defined(OUTPUT_OSD_FORMAT_CbYCrY)
#define OSD_IMG_FORMAT OSD_FMT_CbYCrY
#endif
#else
// define MPEG4 osd output format, select from the following avaiable format for non-OS
#define OSD_IMG_FORMAT OSD_FMT_YUV //#define OSD_IMG_FORMAT OSD_FMT_CbYCrY
#endif // avaiable format, end #define FMPEG4_IOCTL_OSD_INIT 0x4190 #define FMPEG4_IOCTL_OSD_ALPHABLEND 0x4191/***************************************************************************** * MPEG4 OSD Parameter structures ****************************************************************************/ typedef struct { uint32_t source_width; /**< To specify the overlay image width in pels.
* The maximum overlay image width specified by user
* can't exceed 1024.
*/
uint32_t source_height; /**< To specify the overlay image height in pels.*/
uint8_t * source_base_phy; /**< To specify the Y component's starting address of overlay image.
* - For YUV 420 : this address must be a multiple of 16 pixels.
* - For CbYCrY 422 : this address must be a multiple of 8 pixels.
*/
uint8_t * source_base_u_phy;/**< To specify the U component's starting address of overlay image.
* This variable is only used for YUV 420.
* - For YUV 420 : this address must be a multiple of 16 pixels.
*/
uint8_t * source_base_v_phy;/**< To specify the V component's starting address of overlay image.
* This variable is only used for YUV 420.
* - For YUV 420 : this address must be a multiple of 16 pixels.
*/
uint32_t output_width; /**< To specify the background image width in pels.*/
uint32_t output_height; /**< To specify the background image height in pels.*/
uint8_t * output_base_phy; /**< To specify the Y component's starting address of background image.
* - For YUV 420 : this address must be a multiple of 16 pixels.
* - For CbYCrY 422 : this address must be a multiple of 8 pixels.
*/
uint8_t * output_base_u_phy;/**< To specify the U component's starting address of background image.
* This variable is only used for YUV 420.
* - For YUV 420 : this address must be a multiple of 16 pixels.
*/
uint8_t * output_base_v_phy;/**< To specify the V component's starting address of background image.
* This variable is only used for YUV 420.
* - For YUV 420 : this address must be a multiple of 16 pixels.
*/
uint32_t osd_x; /**<
* User can use this parameter to specify the upper-left x coordinate
* of overlay image within background image.
* - For YUV 420 : the x coordinate must be a multiple of 16 pixels.
* - For CbYCrY 422 : the x coordinate must be a multiple of 4 pixels.
*/
uint32_t osd_y; /**<
* User can use this parameter to specify the upper-left y coordinate
* of overlay image within background frame.
*/
uint32_t alpha; /**<
* User can use this parameter to specify the alpha value of overlay
* image. The alpha value is between 0 to 255. It will make overlay
* image opaque if alpha value is equal to 255. And the overlay image
* will be transparent if alpha value is equal to 0.
*/ uint32_t u32API_version; uint32_t u32VirtualBaseAddr; } FMP4_OSD_PARAM; #ifdef MP4VOSD_GLOBALS #define MP4VOSD_EXT #else #define MP4VOSD_EXT extern #endif MP4VOSD_EXT void Mp4VOsd_Init(FMP4_OSD_PARAM * ptParam); MP4VOSD_EXT void Mp4VOsd_AlphaBlend(FMP4_OSD_PARAM * ptParam);#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -