⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tvphdm.h

📁 ti的数字电视芯片 tvp9000的源码
💻 H
字号:
#ifndef TVP_HDM_DOT_H_IS_DEFINED
#define TVP_HDM_DOT_H_IS_DEFINED

/*********************************************************************
*    Property of Texas Instruments Incorporated, Copyright 2004
*    All rights reserved                                              
**********************************************************************/
/*********************************************************************
*                                                                     
* Description:                                                        
*   public include file for TvpHdm.c                                     
*   It includes only the definitions that are needed for the API      
*                                                                     
**********************************************************************/
/*********************************************************************
*
* $Revision: $
*
* $History: TvpHdm.h $
* 
*********************************************************************/

/* -----------------------------------------------------------*/
/* ------ DEFINE ---------------------------------------------*/
/* -----------------------------------------------------------*/

/* Defines of the layer IDs used when calling hdmNewDisplay */
#define TVP_CURSOR_ID            (0)
#define TVP_GRAPHICS_2D_MIN_ID   (1)
#define TVP_GRAPHICS_2D_MAX_ID   (16)        
#define TVP_VIDEO_ID             (17)
#define TVP_STILL_ID             (18)
#define TVP_BACKGROUND_ID        (19)
#define TVP_VIRTUAL_ID           (255) /* All the id have to be less than 32 */
                                       /* Except for the virtual id see the */
                                       /* API tvpHdmQueryZPlanes */


#define TVP_NO_BLENDING          ((unsigned char)255)  /* No blending */
#define TVP_FULL_TRANSPARENCY    ((unsigned char)0)    /* Full transparent */


/* -----------------------------------------------------------*/
/* ------ ENUM -----------------------------------------------*/
/* -----------------------------------------------------------*/


/*
 * TvpOsdDisptype
 *
 * enumerates all the possible hardware display types, including half 
 * resolution displays and video displays.
 *
 */
typedef enum                          /* v1.2 : do not change the values*/
{
   TVP_BITMAP1          = 0,     /* 1 bit bitmap */
   TVP_BITMAP2          = 1,     /* 2 bit bitmap */
   TVP_BITMAP4          = 2,     /* 4 bit bitmap */
   TVP_BITMAP8          = 3,     /* 8 bit bitmap */

   TVP_RGB16_565        = 8,     /* RGB 16-bit Graphic Display */
     
   TVP_ARGB16_1555      = 10,    /* RGB 16-bit Graphic Display */
   TVP_ARGB16_4444      = 11,    /* RGB 16-bit Graphic Display with alpha blending factor */

   TVP_RGB24            = 12,    /* RGB 24-bit Graphic Display */

   TVP_ARGB24_6666      = 14,    /* RGB 24-bit Graphic Display with alpha blending factor */
   TVP_ARGB32           = 15,    /* RGB 32-bit Graphic Display with alpha blending factor */

   // Video and Still layer color space conversion modes.

   TVP_YCRCB422_SD_VID  = 17,    /* 4:2:2 CBYCR 601 Video Display   */
   TVP_YCRCB422_SD_GRP  = 19,    /* 4:2:2 CBYCR 601 Graphic Display */
   TVP_YCRCB422_HD_VID  = 21,    /* 4:2:2 CBYCR 709 Video Display   */
   TVP_YCRCB422_HD_GRP  = 23     /* 4:2:2 CBYCR 709 Graphic Display */

} TvpOsdDisptype;

                       
/*
 * TvpOsdBlendType 
 * 
 * Describes all the possible blending types that are available.
 */
typedef enum
{
  TVP_NO_BLEND      = 0,        /* No Blending */
  TVP_DISPLAY_B     = 1,        /* 256 blending levels on the window basis */
  TVP_COLOR_B       = 2,        /* 256 blending levels on the CLUT basis on alpha factor */
  TVP_PIXEL_B       = 3         /* 256 blending levels on the pixel embedded alpha blending basis */
} TvpOsdBlendType;


/*
 * TvpOsdLayerType - The layers for which the Z order can be selected.
 */
typedef enum
{
  TVP_DISP_CFG_GRAPHICS_MAIN_LAYER  = 0,
  TVP_DISP_CFG_GRAPHICS_AUX_LAYER   = 1,
  TVP_DISP_CFG_VIDEO_LAYER          = 2,
  TVP_DISP_CFG_STILL_LAYER          = 3
} TvpOsdLayerType;

/* -----------------------------------------------------------*/
/* ------ STRUCT ---------------------------------------------*/
/* -----------------------------------------------------------*/

/*
 * OSDtiling
 *
 * Defines the tiling structure.
 */
typedef struct 
{
  Tvp_On_Off status_tiling;
  unsigned long width_tiling;     /* Pixels */
  unsigned long height_tiling;    /* Pixels */
  unsigned long x_offset_tiling;  /* Pixels */
  unsigned long y_offset_tiling;  /* Pixels */
} TvpOsdTiling;


/*
 * OSDCoords
 *
 * Defines the upper left and bottom right coordinates of an area in pixel units.
 *
 */
typedef struct 
{
  long  pixX0;
  long  pixY0;
  long  pixX1;
  long  pixY1;
} TvpOsdCoords;

/*
 * TvpBuffer
 *
 * Defines a continuous region of memory bufferSize bytes long, at the address
 * pBuffer. 
 *
 */
typedef struct 
{
  unsigned long  bufferSize;          /* Size of buffer in bytes */
  unsigned long  *pBuffer;            /* Pointer to Buffer */
} TvpBuffer;            /* Buffer structure definition         */

/*
 * TvpBitmap
 *
 * Defines a memory allocation specifically for drawing graphics images.
 *
 */
typedef struct 
{
    char *         pBitmap;       // Pointer to bitmap image.
    unsigned long  stride;        // Bitmap stride in bytes.
    unsigned long  width;         // Horizontal size of bitmap in pixels.
    unsigned long  height;        // Vertical size of bitmap in pixels.
    TvpOsdDisptype format;        // Pixel format of bitmap.
} TvpBitmap;

/* -----------------------------------------------------------*/
/* ------ TYPE -----------------------------------------------*/
/* -----------------------------------------------------------*/


typedef unsigned long TvpHDisplay;            /* Display Handle */
typedef unsigned long TvpHFont;               /* Font Handle */
typedef unsigned long TvpOsdDisplayId;        /* Display id type */
typedef unsigned long TvpOsdZOrder;           /* Z order type */
typedef unsigned long TvpOsdBlendFactor;      /* Blend Factor type */
typedef unsigned long TvpOsdZPlanes;          /* Z planes type */
typedef unsigned long TvpOsdColorCbYCr;       /* Background color type */
typedef unsigned long TvpOsdRGB24;            /* 24-bit color value */
typedef unsigned long TvpTransMaskBits;       /* Transparent color mask type*/


/******************************************************************************
*                                                                              
*  API FUNCTION PROTOTYPES                                                     
*                                                                              
*******************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif

TVP_FERROR tvpHdmInit (void);
TVP_FERROR tvpHdmNewDisplay(TvpBuffer *pBufApi, TvpBitmap *pBitmap, TvpOsdCoords *pCoords, TvpOsdDisplayId id, TvpHDisplay *hDisplay);
TVP_FERROR tvpHdmDeleteDisplay(TvpHDisplay hDisplay);
TVP_FERROR tvpHdmGetArea(TvpHDisplay hDisplay, TvpOsdCoords *pCoords);
TVP_FERROR tvpHdmGetBlendEnable(TvpHDisplay hDisplay, TvpOsdBlendType *pBlendType);
TVP_FERROR tvpHdmGetBlendFactor(TvpHDisplay hDisplay, TvpOsdBlendFactor *pBlendFactor);
TVP_FERROR tvpHdmGetCoords(TvpHDisplay hDisplay, TvpOsdCoords *pCoords);
TVP_FERROR tvpHdmGetDisplayType(TvpHDisplay hDisplay, TvpOsdDisptype *pDtype);
TVP_FERROR tvpHdmGetTransparencyEnable(TvpHDisplay hDisplay, Tvp_On_Off *pTransparencyFlag);
TVP_FERROR tvpHdmSetTransparencyColor(TvpHDisplay hDisplay, TvpOsdRGB24 color);
TVP_FERROR tvpHdmGetTransparencyColor(TvpHDisplay hDisplay, TvpOsdRGB24 *pColor);
TVP_FERROR tvpHdmSetAntiFlickering(TvpHDisplay hDisplay, Tvp_On_Off antiflickeringFlag, Tvp_On_Off antiflickeringFilter);
TVP_FERROR tvpHdmGetAntiFlickering(TvpHDisplay hDisplay, Tvp_On_Off *pAntiflickeringFlag, Tvp_On_Off *pAntiflickeringFilter);
TVP_FERROR tvpHdmGetVisibility(TvpHDisplay hDisplay, Tvp_On_Off *pVisibility_flag);
TVP_FERROR tvpHdmGetZOrder(TvpHDisplay hDisplay,TvpOsdZOrder *pZorder);
TVP_FERROR tvpHdmQueryDisplayBufferSize(TvpOsdCoords *pCoords, TvpOsdDisptype dtype, TvpBuffer *pBufDisp);
TVP_FERROR tvpHdmQueryIntAPIStorage(TvpOsdDisptype dtype, TvpBuffer *pBufApi);
TVP_FERROR tvpHdmSetBackGroundColor(TvpOsdColorCbYCr color);
TVP_FERROR tvpHdmGetBackGroundColor(TvpOsdColorCbYCr *pColor);
TVP_FERROR tvpHdmSetBlendEnable(TvpHDisplay hDisplay, TvpOsdBlendType blendType);
TVP_FERROR tvpHdmSetBlendFactor(TvpHDisplay hDisplay, TvpOsdBlendFactor blendFactor);
TVP_FERROR tvpHdmSetCoords(TvpHDisplay hDisplay, TvpOsdCoords *pCoords);
TVP_FERROR tvpHdmSetDisplayBuffer(TvpHDisplay hDisplay, TvpBuffer *pBufDisp);
TVP_FERROR tvpHdmSetDisplayBufferCoords(TvpHDisplay hDisplay, TvpBuffer *pBufDisp, TvpOsdCoords *pCoords);
TVP_FERROR tvpHdmSetTransparencyEnable(TvpHDisplay hDisplay, Tvp_On_Off transparency_flag);
TVP_FERROR tvpHdmSetArea(TvpHDisplay hDisplay, TvpOsdCoords *pCoords);
TVP_FERROR tvpHdmSetVisibility(TvpHDisplay hDisplay, Tvp_On_Off visibility_flag);
TVP_FERROR tvpHdmSetZOrder(TvpHDisplay hDisplay, TvpOsdZOrder newZOrder);
TVP_FERROR tvpHdmSwapDisplay(TvpHDisplay hDisplay1, TvpHDisplay hDisplay2);
TVP_FERROR tvpHdmVerifyCoords(TvpOsdCoords *pCoords, TvpOsdDisptype dtype, TvpOsdDisplayId id);
TVP_FERROR tvpHdmQueryZplanes(TvpOsdZPlanes *pZPlanes);
TVP_FERROR tvpHdmSetLayerOrder(TvpOsdLayerType Layer1, TvpOsdLayerType Layer2, TvpOsdLayerType Layer3, TvpOsdLayerType Layer4, Tvp_On_Off PriorityEnable);
TVP_FERROR tvpHdmSetNtscOutputEnable(Tvp_On_Off Enable);
TVP_FERROR tvpHdmSetAntiFlickeringEnable(Tvp_On_Off antiflickeringEnable);
TVP_FERROR tvpHdmSetTransparencyMasks(TvpTransMaskBits stillMask, TvpTransMaskBits videoMask);

TVP_FERROR tvpFntQueryFontStorage(TvpBuffer * pTvpBufferApi, TvpBuffer * pTvpBufferInfo);
TVP_FERROR tvpFntNewFont(TvpBuffer * pTvpBufferApi, TvpBuffer * pTvpBufferInfo, TvpBuffer * pTvpBufferGlyph, unsigned long Height, TvpOsdDisptype Format, TvpHFont * phFont);
TVP_FERROR tvpFntDrawString(char * pString, unsigned long Characters, TvpHFont hFont, TvpBitmap * pTvpBitmap, TvpOsdCoords * pCoordinates, unsigned long Base);
TVP_FERROR tvpFntDeleteFont(TvpHFont hFont);
TVP_FERROR tvpFntGetStringDimensions(char * pString, unsigned long Characters, TvpHFont hFont, unsigned long * pWidth, unsigned long * pHeight);

TVP_FERROR tvpBltInit(unsigned long * pBltBuffer, unsigned long BltBufferSize);
TVP_FERROR tvpBltFill(TvpBitmap * pTvpBitmap, TvpOsdCoords * pCoordinates, unsigned long Color);
TVP_FERROR tvpBltFillAccel(TvpBitmap * pTvpBitmap, TvpOsdCoords * pCoordinates, unsigned long Color);
TVP_FERROR tvpBltCopy(TvpBitmap * pSrcTvpBitmap, TvpBitmap * pDstTvpBitmap, TvpOsdCoords * pSrcCoordinates, TvpOsdCoords * pDstCoordinates);
TVP_FERROR tvpBltCopyAccel(TvpBitmap * pSrcTvpBitmap, TvpBitmap * pDstTvpBitmap, TvpOsdCoords * pSrcCoordinates, TvpOsdCoords * pDstCoordinates);
TVP_FERROR tvpBltClear(TvpBitmap * pTvpBitmap, unsigned long Color);

TVP_FERROR tvpHdmSetBackGroundColor(TvpOsdColorCbYCr color);
TVP_FERROR tvpHdmTempBackGroundColor(TvpOsdColorCbYCr color);

#ifdef __cplusplus
}
#endif


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -