/**
 * @file hv_cal_OsdScaler.h
 * @brief Osd Cal layer scaler interface.
 * @verbatim
 * ==============================================================================
 *                        ##### How to use this driver #####
 * ==============================================================================
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 0.0.1
 * @date 2022-08-22
 */


#ifndef _HV_CAL_OSDSCALER_H
#define _HV_CAL_OSDSCALER_H

#include "hv_drv_OsdTypes.h"

typedef enum _OsdScalerMode
{
    OSD_SCALER_MODE_FILTER = 0,
    OSD_SCALER_MODE_BILINEAR,
    OSD_SCALER_MODE_REPEAT,
    OSD_SCALER_MODE_KEEP,
} OsdScalerMode;

/**
 * @brief scaler initialization function
 * @param[in] None
 * @return VOID without return
 */
VOID Hv_Cal_OsdScaler_Init(VOID);

/**
 * @brief set scaler enable/disable status
 * @param[in] bEnable 1 for enable, 0 for disable
 * @return VOID without return
 */
VOID Hv_Cal_OsdScaler_SetEnable(BOOL bEnable);

/**
 * @brief set scaler parameter
 * @param[in] usHszin H size before scaler
 * @param[in] usVszin V size before scaler
 * @param[in] usHszout H size afer scaler
 * @param[in] usVszout V size after scaler
 * @return VOID without return
 */
VOID Hv_Cal_OsdScaler_SetScalerInOut(USHORT16 usHszin, USHORT16 usVszin,
                                    USHORT16 usHszout, USHORT16 usVszout);

/**
 * @brief set scaler ratio
 * @param[in] None
 * @return VOID without return
 */
VOID Hv_Cal_OsdScaler_SetScalerRatio();

/**
 * @brief Set scaler mode
 * @param[in] enMode mode selection OSD_SCALER_MODE_FILTER
 *                                  OSD_SCALER_MODE_BILINEAR
 *                                  OSD_SCALER_MODE_REPEAT
 *                                  OSD_SCALER_MODE_KEEP
 * @return VOID without return
 */
VOID Hv_Cal_OsdScaler_SetMode(OsdScalerMode enMode);

#endif
