123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- /*! \addtogroup display_mid Display Middleware
- * @{
- */
- /******************************************************************************/
- /**
- *
- * @file mid_display.h
- *
- * @brief This file specifies the APIs provided to control display middleware
- *
- * @note Copyright (c) 2009 Sunplus Technology Co., Ltd. \n
- * All rights reserved.
- *
- * @author
- *
- ******************************************************************************/
- #ifndef __MID_DISPLAY_H
- #define __MID_DISPLAY_H
- /*******************************************************************************
- * Header include
- ******************************************************************************/
- //#include "gl_types.h"
- #include "drv_vip_external.h"
- #ifdef MIDDISP_EXTERN_HERE
- #define MIDDISP_EXTERN ///< color attribute
- #else
- #define MIDDISP_EXTERN extern ///< color attribute
- #endif
- #define DAR_FORBIDDEN 0 ///< active format is the same as the coded frame
- #define DAR_SQUARE 1 ///< active format is the same as the coded frame
- #define DAR_4_3 2 ///< active format is the same as the coded frame
- #define DAR_16_9 3 ///< active format is the same as the coded frame
- #define DAR_221_1 4 ///< active format is the same as the coded frame
- #define DAR_14_9 5 ///< active format is the same as the coded frame
- /*******************************************************************************
- * Enumerator
- ******************************************************************************/
- /**
- *@brief Aspect ratio spanning mode select
- */
- typedef enum
- {
- SPAN_NONE,
- SPAN_LETTERBOX,
- SPAN_PANSCAN,
- SPAN_AFD_FULL,
- } MID_DISP_SpanMode_e;
- /**
- *@brief Control status enum
- */
- typedef enum
- {
- MIDDISP_SUCCESS, // successful outcome
- MIDDISP_ERR_FAILURE, // operation failed
- MIDDISP_ERR_DIV_ZERO, // divide by zero
- MIDDISP_ERR_IDX_OVERFLOW, // index overflow
- MIDDISP_ERR_IDX_MISMATCH, // index mismatch
- MIDDISP_ERR_NULL_PARAM, // null parameter
- MIDDISP_ERR_UNSUPPORT_FMT, // unsupport format
- } MID_DISP_Status_e;
- typedef enum e_stb_av_aspect_mode
- {
- ASPECT_MODE_IGNORE = 0,
- ASPECT_MODE_LETTERBOX = 1,
- ASPECT_MODE_PANSCAN = 2,
- ASPECT_MODE_COMBINED = 3,
- ASPECT_MODE_FORCED_LETTERBOX = 4,
- ASPECT_MODE_FORCED_PANSCAN = 5
- }E_STB_AV_ASPECT_MODE;
- typedef enum e_stb_av_aspect_ratio
- {
- ASPECT_RATIO_4_3 = 0,
- ASPECT_RATIO_16_9 = 1,
- ASPECT_RATIO_221_1 = 2,
- ASPECT_RATIO_1_1 = 3,
- ASPECT_RATIO_14_9,
- ASPECT_RATIO_4_3_PROTECT_14_9_CENTRE
- }E_STB_AV_ASPECT_RATIO; //use in tv type & tv aspect ratio
- /*******************************************************************************
- * Define
- ******************************************************************************/
- /*******************************************************************************
- * Structure
- ******************************************************************************/
- typedef struct
- {
- INT32 sdHstart; ///< h start
- INT32 sdVstart; ///< v start
- UINT32 dHsize; ///< h size
- UINT32 dVsize; ///< v size
- } DISP_Win_t;
- typedef struct
- {
- UINT16 wHsize; ///< h size
- UINT16 wVsize; ///< v size
- } DISP_Plane_t;
- /*******************************************************************************
- * Variables
- ******************************************************************************/
- typedef void (*iCbFunc2) (UINT32); ///< for free picture memory callback, (joeypan, 2010/01/15)
- typedef void* DRV_OsdRegionHandle_t;
- /*******************************************************************************
- * Program
- ******************************************************************************/
- MID_DISP_Status_e MID_DISP_SetMh5En(BOOL fEn);
- MID_DISP_Status_e MID_DISP_SetSceneAspectRatio(VIP_MHEG5_SceneAspectRatio eSceneAR, bool fMheg5Active, UINT8 bInfo);
- MID_DISP_Status_e MID_DISP_SetWideAlignment(VIP_MHEG5_WideAignment eSceneAR, bool fMheg5Active, UINT8 bInfo);
- MID_DISP_Status_e MID_DISP_UpdateVIP(bool fMheg5En, UINT8 bInfo);
- MID_DISP_Status_e MID_DISP_GetDecFC(VIP_MHEG5_DecFC *eDecFC);
- /******************************************************************************/
- /**
- * @brief Set mheg5 window position and size
- *
- * @param sdHstart \n
- * Describe mheg5 window horizontal start.\n
- * @param sdVstart \n
- * Describe mheg5 window vertical start.\n
- * @param dHsize \n
- * Describe mheg5 window horizontal size.\n
- * @param dVsize \n
- * Describe mheg5 window vertical size.\n
- *
- * @return MIDDISP_SUCCESS: when setup is success.\n
- * MIDDISP_ERR_FAILURE: if any of the parameters is invalid.\n
- *
- * @note Description: MHEG5 is an international standard for platform sharing data and content in digital tv system, such as set-top-box.
- * It defines the mheg5 plane and window above it for video content description. For any different resolution
- * content, we must transform to the mheg5 plane based coordination. Then based on the mheg5 window
- * description, we could get the uniform standard video content display for any different plaform. It's the goal
- * of what mheg5 standard want to be. So based on this concept, we provide the mheg5 plane, window position,
- * and size to achieve mheg5's requirement.\n
- *
- * @note Restrictions: It's implemented by same structure in zoom. So it's execulsive for zoom application.
- *******************************************************************************/
- MIDDISP_EXTERN MID_DISP_Status_e MID_DISP_SetMh5WinPositionAndSize(INT32 sdHstart, INT32 sdVstart, UINT32 dHsize, UINT32 dVsize, bool fMheg5Active, bool bInfo);
- /******************************************************************************/
- /**
- * @brief Get mheg5 window
- *
- * @param *stMh5Win \n
- * sdHstart: Describe mheg5 window horizontal start position.\n
- * sdVstart: Describe mheg5 window vertical start position.\n
- * dHsize: Describe mheg5 window horizontal total size.\n
- * dVsize: Describe mheg5 window vertical total size.\n
- *
- * @return MIDDISP_SUCCESS: when setup is success.\n
- * MIDDISP_ERR_FAILURE: if any of the parameters is invalid.\n
- *
- * @note Description: MHEG5 is an international standard for platform sharing data and content in digital tv system, such as set-top-box.
- * It defines the mheg5 plane and window above it for video content description. For any different resolution
- * content, we must transform to the mheg5 plane based coordination. Then based on the mheg5 window
- * description, we could get the uniform standard video content display for any different plaform. It's the goal
- * of what mheg5 standard want to be. So based on this concept, we provide the mheg5 plane, window position,
- * and size to achieve mheg5's requirement.\n
- *
- * @note Restrictions: It's implemented by same structure in zoom. So it's execulsive for zoom application.
- *******************************************************************************/
- MIDDISP_EXTERN MID_DISP_Status_e MID_DISP_GetMh5Win(DISP_Win_t* stMh5Win);
- MIDDISP_EXTERN MID_DISP_Status_e MID_DISP_ClearAllDispFrameBuffer(void);
- #endif //__MID_DISPLAY_H
- /*! @} end of addtogroup display_mid*/
|