#ifndef _HV_CAL_OSDDATAPATH_H
#define _HV_CAL_OSDDATAPATH_H

#include "hv_comm_DataType.h"
#include "hv_drv_OsdTypes.h"

#define OSD_RWDMA_BURSTLEN 32

typedef enum _OsdDrawMode
{
    OSD_DRAW_WHOLE = 0,
    OSD_DRAW_EFFECTIVE,
} OsdDrawMode;

/**
 * @brief set Osd blend status with video
 * @param[in] bEnable 1 for enable, 0 for disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetVideoBlendEnable(BOOL bEnable);

/**
 * @brief set Osd blend position on video
 * @param[in] pstArea area structure
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetVideoBlendPosition(OsdArea *pstArea);

/**
 * @brief get current OSD/DDR blend mode
 * @param[in] None
 * @return current mode: DDR_ONLY: only show DDR path
 *                       OSD_ONLY: only show OSD path
 *                       DDR_FIRST: show both DDR/OSD, DDR cover OSD
 *                       OSD_FIRST: show both DDR/OSD, OSD cover DDR

 */
OsdHsBlendMode Hv_Cal_OsdDP_GetHsBlendMode(VOID);
/**
 * @brief select OSD/DDR blend mode
 * @param[in] enMode mode selection DDR_ONLY: only show DDR path
 *                                  OSD_ONLY: only show OSD path
 *                                  DDR_FIRST: show both DDR/OSD, DDR cover OSD
 *                                  OSD_FIRST: show both DDR/OSD, OSD cover DDR
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetHsBlendMode(OsdHsBlendMode enMode);

/**
 * @brief set DDR canvas size
 * @param[in] pstArea canvas area
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetDDRCanvas(OsdArea *pstArea);

/**
 * @brief Get DDR canvas size
 * @param[out] pstArea canvas area
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_GetDDRCanvas(OsdArea *pstArea);

/**
 * @brief set Osd canvas size
 * @param[in] pstArea canvas area
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetOsdCanvas(OsdArea *pstArea);

/**
 * @brief Get Osd canvas size
 * @param[out] pstArea canvas area
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_GetOsdCanvas(OsdArea *pstArea);

/**
 * @brief Set Prescaler canvas size
 * @param[in] usWidth canvas width
 * @param[in] usHeight canvas height
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetPreScalerSize(USHORT16 usWidth, USHORT16 usHeight);

/**
 * @brief Get Prescaler canvas size
 * @param[out] pusWidth canvas width
 * @param[out] pusHeight canvas height
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_GetPreScalerSize(USHORT16 *pusWidth, USHORT16 *pusHeight);

/**
 * @brief set Prescaler canvas htotal
 * @param[in] usHtotal htotal value
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetPreScalerHtotal(USHORT16 usHtotal);

/**
 * @brief set Mtx canvas size
 * @param[in] usWidth canvas width
 * @param[in] usHeight canvas height
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetMtxCanvas(USHORT16 usWidth, USHORT16 usHeight);

/**
 * @brief set draw mode
 * @param[in] enMode mode selection OSD_DRAW_WHOLE: draw whole area
 *                                  OSD_DRAW_EFFECTIVE: draw effective area
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_SetDrawMode(OsdDrawMode enMode);

USHORT16 Hv_Cal_OsdDP_GetRealHActive(VOID);

USHORT16 Hv_Cal_OsdDP_GetRealVActive(VOID);

USHORT16 Hv_Cal_OsdDP_GetRealVTotal(VOID);

USHORT16 Hv_Cal_OsdDP_GetScreenHActive(VOID);

USHORT16 Hv_Cal_OsdDP_GetScreenVActive(VOID);

VOID Hv_Cal_OsdDP_SetOsdScalerup(BOOL bEnable);

BOOL Hv_Cal_OsdDP_GetOsdScalerup(VOID);

VOID Hv_Cal_OsdDP_ReconfigDataPath(VOID);
/**
 * @brief DataPath initialization function
 * @param[in] None
 * @return VOID without return
 */
VOID Hv_Cal_OsdDP_Init(VOID);

#endif
