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

📄 csl_osd.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/** @mainpage OSD CSL 3.x
 *
 * @section Introduction
 *
 * @subsection xxx Purpose and Scope
 * The purpose of this document is to identify a set of common CSL APIs for
 * the  OSD module across various devices. The CSL developer is expected to
 * refer to this document while designing APIs for these modules. Some of the
 * listed APIs may not be applicable to a given OSD module. While other cases
 * this list of APIs may not be sufficient to cover all the features of a
 * particular OSD Module. The CSL developer should use his discretion designing
 * new APIs or extending the existing ones to cover these.
 *
 * @subsection aaa Terms and Abbreviations
 *   -# CSL:  Chip Support Library
 *   -# API:  Application Programmer Interface
 *
 * @subsection References
 *    -# CSL-001-DES, CSL 3.x Design Specification DocumentVersion 1.02
 *
 */

/** @file csl_osd.h
 *
 * @brief    Header file for functional layer of CSL
 *
 * Description
 *    - The different enumerations, structure definitions
 *      and function declarations
 *
 * Modification 1
 *    - modified on: 1/10/2004
 *    - reason: Created the sources
 *
 *
 * @date 7th Oct, 2004
 * @author Sandeep Tiwari
 *
 */
#ifndef _CSL_OSD_H_
#define _CSL_OSD_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <cslr.h>
#include <csl_error.h>
#include <csl_sysData.h>
#include <csl_types.h>
#include <cslr_osd.h>

/****** ********************************************************************\
*		OSD global macro declarations
\**************************************************************************/

/** Constants for passing parameters to the OSD Hardware Setup function
 */

/** For indicating that the OSD data i/p format is cb cr  */
#define CSL_OSD_FORMAT_CBCR                          (0)
/** For indicating that the OSD data i/p format is cr cb   */
#define CSL_OSD_FORMAT_CRCB                          (1)
/** For using ROM look up table    */
#define CSL_OSD_LUT_ROM                          (0)
/** For using RAM look up table   */
#define CSL_OSD_LUT_RAM                          (1)
/** configure as field mode  */
#define CSL_OSD_FIELD_MODE                       (0)
/** configure as frame mode   */
#define CSL_OSD_FRAME_MODE                       (1)
/** configure as no zoom   */
#define CSL_OSD_NO_ZOOM                         (0)
/** configure as 1x zoom   */
#define CSL_OSD_ZOOM_1X                         (0)
/** configure as 2x zoom   */
#define CSL_OSD_ZOOM_2X                         (1)
/** configure as 4X zoom   */
#define CSL_OSD_ZOOM_4X                         (2)
/** bitmap mode   */
#define CSL_OSD_BMP                             (0)
/** RGB 16 bit mode (R-5,G-6,B-5) */
#define CSL_OSD_RGB_16BIT                       (1)
/** bitmap is 1-bit mode   */
#define CSL_OSD_BMP_1BIT                        (0) 
/** bitmap is 2-bit mode   */
#define CSL_OSD_BMP_2BIT                        (1)      
/** bitmap mode is 4-bit mode  */
#define CSL_OSD_BMP_4BIT                        (2)
/** bitmap mode is 8-bit mode  */
#define CSL_OSD_BMP_8BIT                        (3) 

/** Parameters used in selection of window */

/** OSD Video Window 0 ID */
#define CSL_OSD_VID_WIN0                    (0)			
/** OSD Video Window 1 ID */
#define	CSL_OSD_VID_WIN1                    (1)
/** OSD Bitmap Window 0 ID */
#define CSL_OSD_BMP_WIN0                    (2)
/** OSD Bitmap Window 1 ID */
#define CSL_OSD_BMP_WIN1		    (3)
/** OSD Hardware Cursor Window ID */
#define CSL_OSD_CURSOR			    (4)
/** Number of Hardware Windows Supported by OSD */
#define CSL_OSD_WIN_MAX  		(5)


    
/**************************************************************************\
* OSD global typedef declarations
\**************************************************************************/

/** @brief This object contains the reference to the instance of OSD opened
 *  using the @a CSL_osdOpen().
 *
 *  The pointer to this, is passed to all OSD CSL APIs.
 */
typedef struct CSL_OsdObj {
	/** This is the mode which the CSL instance is opened     */
	CSL_OpenMode openMode;
	/** This is a unique identifier to the instance of OSD being
	 *  referred to by this object
	 */
	CSL_Uid uid;
	/** This is the variable that contains the current state of a
	 *  resource being shared by current instance of OSD with
     *  other peripherals
     */
	CSL_Xio xio;
	/** This is a pointer to the registers of the instance of OSD
     *  referred to by this object
     */
	CSL_OsdRegsOvly regs;
	/** This is the instance of OSD being referred to by this object  */
	CSL_OsdNum perNum;
}CSL_OsdObj;

typedef struct CSL_OsdObj *CSL_OsdHandle;


/** @brief Prototype for OSD Hw setup
*/

typedef struct CSL_OsdHwSetup_{ 
        /** Background CLUT Selection: 0==>RAM, 1==>ROM */
        Uint16 bclut;
        /** CLUT RAM for Y */
        Uint16 y[256];
        /** CLUT RAM for Cb */
        Uint16 cb[256];
        /** CLUT RAM for Cr */
        Uint16 cr[256];
        /** Base Pixel X */
        Uint16 basepx;
        /** Base Pixel Y */
        Uint16 basepy; 

}CSL_OsdHwSetup;

/** @brief Enumeration for queries passed to @a CSL_osdGetHwStatus()
 *
 * This is used to get the status of different operations or to get the
 * existing setup of OSD.
 */

typedef enum {
      
	 /** Get OSD window data address (response type: @a (CSL_GetWinAddr *)) */ 
         CSL_OSD_QUERY_WIN_ADDR=1,
			 
         /** Get OSD video window 0, ping pong buffer address 
             (response type: @a (Uint32*) */ 
         CSL_OSD_QUERY_PINGPONG_BUFFER_ADDR,
         
         /** Get the busy status of the CLUT (response type: @a (Uint16*)) */
         CSL_OSD_QUERY_CLUT_BUSY
         
	      
} CSL_OsdHwStatusQuery;


/** @brief Enumeration for queries passed to @a CSL_osdHwControl()
 *
 * This is used to select the commands to control the operations
 * existing setup of OSD. The arguments to be passed with each
 * enumeration if any are specified next to the enumeration.
 */
 typedef enum {
         
         /** Sets parameters which will affect all OSD windows:
             argument @a (CSL_OsdModeData *) */ 
         CSL_OSD_CMD_SET_ALL_WIN=1,
         
         /** Sets parameters which will affect both OSD video windows:
             argument @a (CSL_OsdVideoModeData *) */ 
         CSL_OSD_CMD_SET_VIDEO_WIN,
         
         /** Sets parameters which will affect both OSD bitmap window:
             argument @a (CSL_OsdBitmapModeData *) */ 
         CSL_OSD_CMD_SET_BITMAP_WIN,

         /** Configures OSD window 'WINID': argument @a (CSL_OsdWinConfig *) */                 
         CSL_OSD_CMD_SET_WIN_CONFIG,

         /** Configures parameters specific to OSD bitmap windows:
             argument @a (CSL_OsdBmpWinConfig *) */       
         CSL_OSD_CMD_SET_BMP_WIN_CONFIG,
         
         /** Set rectangular cursor parameters: argument @a (CSL_OsdCursorConfig *) */       
         CSL_OSD_CMD_SET_CURSOR_CONFIG,
         
         /** Sets OSD window start position: argument @a (CSL_OsdStart*) */
         CSL_OSD_CMD_WIN_START,
            
         /** Sets OSD window horizontal & vertical size:
             argument @a (CSL_OsdSize*) */       
         CSL_OSD_CMD_WIN_SIZE,

         /** Enable(show)/disable(hide) OSD window: argument @a (CSL_OsdWinEnable *) */                        
         CSL_OSD_CMD_OSDWIN_SHOW,

         /** sets OSD window data address: argument @a (CSL_OsdWinAddr*) */             
         CSL_OSD_CMD_SET_WIN_ADDR,
         
         /** sets OSD LUT in RAM: argument @a (CSL_OsdRamLut*) */
         CSL_OSD_CMD_SET_RAM_LUT,
         
         /** Sets OSD video window 0 ping pong buffer address:
             argument @a (CSL_OsdPingAddr *) */
         CSL_OSD_CMD_SET_PINGPONG_BUFFER_ADDR,
                    
         /** Switches OSD video window 0 address:
             argument @a (CSL_OsdPingBuff *) */
         CSL_OSD_CMD_SWITCH_TO_PINGPONG,
         
         /** Sets OSD 1,2,4-bit bitmap color pallette: 
             argument @a (CSL_OsdBmpColor *) */                 
         CSL_OSD_CMD_SET_BMP_COLOR

              
  } CSL_OsdHwControlCmd;

 /**
  * @brief Set OSD bitmap window mode parameters
  * @ this routine set parameters which will affect both OSD bitmap windows
  */

 typedef struct CSL_OsdBitmapModeData {
	 /** Vertical Expansion enable */
	 Uint16 vertexpand;
	 /** Horizontal expansion enable */
	 Uint16 horzexpand;

 }CSL_OsdBitmapModeData;

 /**
  * @brief Set OSD 1,2,4-bit bitmap color pallatte
  */

 typedef struct CSL_OsdBmpColor {

	  /** Window identifier */
	  Uint16 winID; 
	  /** Bitmap width */
	  Uint16 bmpwidth;
	  /** Bitmap value */
	  Uint16 bmpvalue;
	  /** LUT colot */
	  Uint16 lutcolor;

 }CSL_OsdBmpColor;

 /**
  * @brief sets OSD bitmap window configuration
  */

 typedef struct CSL_OsdBmpWinConfig {
	  /** Window identifier */
	  Uint16 winID;
	  /** RGB input select: 0==> Bitmap input, 1==> 16-bit RGB mode */
	  Uint16 inputMode;
	  /** CLUT select: 0==> ROM look-up table, 1==> RAM look-up table */
	  Uint16 selectLut;
	  /** Bitmap bit width */
	  Uint16 bitMapWidth;
	  /** Blending ratio */
	  Uint16 blendRatio;
	  /** Transparency enable: 0==> Disable, 1==> Enable */
	  Uint16 transparencyEnable;
	  /** Window 1 attribute: 0==> OSD window 1, 1==> Attribute window */
	  Uint16 attrWinModeEnable;
	  /** Bitmap bit width OASW = 0 */
	  Uint16 attrWinBlinkInterval;

 }CSL_OsdBmpWinConfig;

 /**
  * @brief set OSD cursor configuration
  */
 typedef struct CSL_OsdCursorConfig {
        /**rectangular cursor horizontal line width */
	 Uint16 pixelWidthH;
	/**rectangular cursor vertical line width */
	 Uint16 pixelHeightV;
	/**CLUT select:0==>ROM-look-up-table,1==>RAM-look-up-table*/
	Uint16 selectlut;
	/**rectangular cursor color palette address */
	Uint16 color;

 }CSL_OsdCursorConfig;

 /**
  *  @brief   Set all OSD window parameters
  *  @ All parameters which affect all OSD windows.
  */

 typedef struct CSL_OsdModeData {
           /** Selects the Cb/Cr or Cr/Cb format */
	    Uint16 cbcr;
	    /** Background color LUT select */	   
	    Uint16 lut;
	    /** Background color */	
	    Uint16 backgrcolor;
	    /** Field signal inversion select */	
	    Uint16 fieldsgInv;
	    /** Base Pixel in X */	
	    Uint16 basepx;
	    /** Base Pixel (Line) in Y */	
           Uint16 basepy;       
	    /** OSD clock select: 0==> VENC clk, 1==>VENC clk/2 */
	    Uint16 osdclk;	

 }CSL_OsdModeData ;

 /**
   *  @brief Set OSD video window ,ping pong buffer address
   */

 typedef struct CSL_OsdPingAddr {
         /** Ping Pong buffer address */	  
	  Uint32 address;

 }CSL_OsdPingAddr;

 /**
   *  @brief Setup OSD LUT in RAM
   */

 typedef struct CSL_OsdRamLut {
        /** Entry number in LUT */
        Uint16 entryNum;
	    /** LUT entries */	   
	    Uint16  lut[3]; 

 }CSL_OsdRamLut;

 /**
  * @brief Set OSD video window mode parameters
  * @ this routine sets parameters which will affect both OSD video

⌨️ 快捷键说明

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