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

#ifndef _HV_DRV_OSDCOMMON_H
#define _HV_DRV_OSDCOMMON_H

#include "hv_drv_OsdWindow.h"
#include "hv_drv_OsdTypes.h"

/**
 * @brief convert pixel format enum to string
 * @param[in] enFormat pixel format
 * @return string required
 */
const CHAR8* Hv_Drv_OsdCommon_GetPixelFormatStr(OsdPixelFormat enFormat);

/**
 * @brief convert resource type enum to string
 * @param[in] enType resource type
 * @return string required
 */
const CHAR8 *Hv_Drv_OsdCommon_GetResourceTypeStr(OsdResourceType enType);

/**
 * @brief convert text align enum to string
 * @param[in] ucAlignType align type
 * @return string required
 */
const CHAR8 *Hv_Drv_OsdCommon_GetTextAlignTypeStr(UCHAR8 ucAlignType);

/**
 * @brief convert resource size enum to string
 * @param[in] enSize resource size
 * @return string required
 */
const CHAR8 *Hv_Drv_OsdCommon_GetResourceSizeStr(OsdResourceSize enSize);

/**
 * @brief convert blending stage enum to string
 * @param[in] enStage stage enum
 * @return string required
 */
const CHAR8 *Hv_Drv_OsdCommon_GetBlendingStageStr(OsdBlendingStage enStage);

/**
 * @brief convert SRAM change type to string
 * @param[in] enType change type
 * @return string required
 */
const CHAR8 *Hv_Drv_OsdCommon_GetSRAMChangeTypeStr(OsdSRAMChangeType enType);

/**
 * @brief get font size in bytes
 * @param[in] enSize width and height of font
 * @param[in] enType bit of font
 * @return font size in bytes
 */
USHORT16 Hv_Drv_OsdCommon_GetResourceBytes(OsdResourceSize enSize, OsdResourceType enType);

/**
 * @brief get bits of pixel format
 * @param[in] enFormat pixel format
 * @return bits of pixel format
 */
UCHAR8 Hv_Drv_OsdCommon_GetPixelBits(OsdPixelFormat enFormat);

#endif
