/** YUV Format Font to be generated by INDEX8 font. For date imprint to generate yuv string to paste on picture. @file FontConv.h @ingroup mFONTCONV Copyright Novatek Microelectronics Corp. 2012. All rights reserved. */ #ifndef _FONTCONV_H #define _FONTCONV_H #include "GxGfx/GxGfx.h" #include "hd_type.h" /** @addtogroup mFONTCONV */ //@{ /** Font rotation degree For date imprint with rotation. */ typedef enum _FONT_CONV_DEG { FONT_CONV_DEG_0, ///< no rotation FONT_CONV_DEG_90, ///< 90 degree rotation FONT_CONV_DEG_180, ///< 180 degree rotation FONT_CONV_DEG_270, ///< 270 degree rotation ENUM_DUMMY4WORD(FONT_CONV_DEG) } FONT_CONV_DEG; /** String font translate to YUV format information An input structure for FontConv */ typedef void (*FontConvCB)(UINT32, UINT32, UINT32, UINT32); typedef struct _FONT_CONV_IN { UINT32 MemAddr; ///< Working Memory Address UINT32 MemSize; ///< Working Memory Size FONT_CONV_DEG Deg; ///< degree CHAR *pStr; ///< Source String FONT *pFont; ///< Font Data COLOR_ITEM ciSolid; ///< Solid Color of Font COLOR_ITEM ciFrame; ///< Frame Color of Font COLOR_ITEM ciTransparet; ///< Transparent Color of Font UINT32 ScaleFactor; ///< Scale Factor base on scale = ScaleFactor/65536 HD_VIDEO_PXLFMT Format; ///< Only Support to GX_IMAGE_PIXEL_FMT_YUV422_PACKED currently BOOL bEnableSmooth; ///< Set TRUE for Font with Frame Smooth FontConvCB pStringCB; ///< user draw string/icon callback PALETTE_ITEM *pPalette ; ///< global palette for callback ISIZE StampSize; } FONT_CONV_IN, *PFONT_CONV_IN; /** String font translate to YUV format information An output structure for FontConv */ typedef struct _FONT_CONV_OUT { HD_VIDEO_FRAME GenImg; ///< Generated Image UINT32 ColorKeyY; ///< Color Key Y UINT32 ColorKeyCb; ///< Color Key Cb UINT32 ColorKeyCr; ///< Color Key Cr UINT32 UsedMemSize; ///< Used Memory Size UINT32 UsedMaxMemSize; ///< Used Max Usage Memory Size } FONT_CONV_OUT, *PFONT_CONV_OUT; typedef struct _F2Y_DC { UINT32 uiPxlfmt; UINT32 uiAddrY; UINT32 uiAddrUV; UINT32 uiLineOffsetY; UINT32 uiLineOffsetUV; } F2Y_DC, *PF2Y_DC; /** Font data to Packed UV 422 A source with INDEX8 trans to YUV format. */ extern ER FontConv(FONT_CONV_IN *pIn, FONT_CONV_OUT *pOut); //@} #endif