/*! \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*/