/**
 * @file hv_drv_DpuPQ.h
 * @brief Header file of mute module.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 *
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2022-08-22
 */

#ifndef __HV_DRV_DPU_PQ_H__
#define __HV_DRV_DPU_PQ_H__

#include "hv_comm_DataType.h"
//#include "HV_REGS_HT7315.h"
#include "hv_vos_Comm.h"
#include "hv_comm_Define.h"

/**
 * @brief set config of PQ macro.
 * @param[in] ucFullLdc, config of HV_PROJECT_CONFIG_FULL_LOCALDIMMING
 * @param[in] ucFullLdc, config of 2d pixelgain
 * @return VOID
 */
VOID Hv_Drv_PQSetMacroConfig(UCHAR8 ucFullLdc, UCHAR8 uc2DPixelGain);
/**
 * @brief bypass all PQ Module.
 * @param[in] bBypass, status of PQ bypass
 * @return VOID
 */
VOID Hv_Drv_PQPathBypass(BOOL bEn);
/**
 * @brief PQ config Init.
 * @param[in] None
 * @return None.
 */
VOID Hv_Drv_DpuPQ_ConfigInit(VOID);
/**
 * @brief PQ common reg Init.
 * @param[in] puiBaseRegAddr:address of Init bin;
 * @param[in] uiLen:address of Init bin;
 * @return None.
 */
VOID Hv_Drv_DpuPQ_CommonRegInit(const UINT32 *puiBaseRegAddr, UINT32 uiLen);
/**
 * @brief CM reg Init.
 * @param[in] puiCmAddr:address of CM Init bin;
 * @param[in] uiLen:address of Init bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMInit(const UINT32 *puiCmAddr, UINT32 uiLen);
/**
 * @brief CM Enable.
 * @param[in] bEn:status of CM enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMEnable(UCHAR8 ucCMEn);
/**
 * @brief CM dma Enable.
 * @param[in] bEn:status of CM dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMVDMEn(UCHAR8 ucCMVDMEn);
/**
 * @brief CM Lut Init.
 * @param[in] puiCmLutAddr:default address of CM lut;
 * @param[in] puiCmLutAddr2:current address of CM lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMLutInit(const UINT32 *puiCmLutAddr, UINT32 *puiCmLutAddr2);
/**
 * @brief CM64（for CM debug by tool）setting hue.
 * @param[in] ucType:type of CM(hue,sat,lum);
 * @param[in] ucIndex:index of hue(0-63);
 * @param[in] ucOffset:value of hue setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_Cm64Axis(UCHAR8 ucType, UCHAR8 ucIndex, UCHAR8 ucShift);
/**
 * @brief CM setting hue.
 * @param[in] ucColor:color of CM(R,G,B,C,M,Y);
 * @param[in] ucCmHue:value of hue setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMSetHue(UCHAR8 ucColor, UCHAR8 ucHue);
/**
 * @brief CM setting sat.
 * @param[in] ucColor:color of CM(R,G,B,C,M,Y);
 * @param[in] ucSat:value of sat setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMSetSat(UCHAR8 ucColor, UCHAR8 ucSat);
/**
 * @brief CM setting lum.
 * @param[in] ucColor:color of CM(R,G,B,C,M,Y);
 * @param[in] ucLum:value of lum setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMSetLum(UCHAR8 ucColor, UCHAR8 ucLum);
/**
 * @brief gamma Lut Init.
 * @param[in] auiGammalut:default address of gamma lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_GammaLutInit(const UINT32 *puiGammalut);
/**
 * @brief osd gamma Lut Init.
 * @param[in] puiOsdGmiAddr:default address of gamma lut;
 * @param[in] puiOsdGmdAddr:default address of gamma lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_OsdGammaLutInit(const UINT32 *puiOsdGmiAddr, const UINT32 *puiOsdGmdAddr);
/**
 * @brief gamma Init.
 * @param[in] puiGammabin:address of gamma Init bin;
 * @param[in] uiLen:address of Init bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_GammaInit(const UINT32 *puiGammabin, UINT32 uiLen);
/**
 * @brief Set different Gamma 
 * @param[in] uiIndex: index of Gamma lut to be set
 * @return VOID
 */
VOID Hv_Drv_PQ_SetGammaIndex(UCHAR8 uiIndex);
/**
 * @brief Set different osd Gamma 
 * @param[in] uiIndex: index of osd Gamma lut to be set
 * @return VOID
 */
VOID Hv_Drv_PQ_SetOsdGammaIndex(UCHAR8 ucIndex);
/**
 * @brief gamma dma Enable.
 * @param[in] ucGammaVDMEn:status of gamma dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_GammaVDMEn(UCHAR8 ucGammaVDMEn);
/**
 * @brief osd gamma dma Enable.
 * @param[in] ucGammaVDMEn:status of osd gamma dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_OsdGammaVDMEn(UCHAR8 ucOsdGammaVDMEn);
/**
 * @brief gamma Enable.
 * @param[in] ucGammaEn:status of gamma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_GammaEnable(UCHAR8 ucGammaEn);
/**
 * @brief Set gamma lut.
 * @param[in] pucGamma:address of gamma lut;
 * @param[in] usTableSize:size of gamma lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_SetGammaLut(UCHAR8 *pucGamma, USHORT16 usTableSize);
/**
 * @brief sharpness Init.
 * @param[in] puiSharpnessbin:address of sharpness Init bin;
 * @param[in] uiLen:address of Init bin;
 * @param[in] puiSharpnessParam:address of sharpness cfg bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_SharpnessInit(const UINT32 *puiSharpnessbin, UINT32 uiLen, const UINT32 *puiSharpnessParam);
/**
 * @brief Sharpness Setting
 * @param[in] ucSharpness value of Sharpness
 * @return VOID
 */
VOID Hv_Drv_PQ_SetSharpness(UCHAR8 ucSharpness);
/**
 * @brief sharpness Enable.
 * @param[in] ucSharpnessEn:status of sharpness enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_SharpnessEnable(UCHAR8 ucSharpnessEn);
/**
 * @brief scaler dma Enable.
 * @param[in] ucScalerVDMEn:status of scaler dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_ScalerVDMEnable(UCHAR8 ucScalerVDMEn);
/**
 * @brief global contrast Init.
 * @param[in] puiGcAddr:address of gc init bin;
 * @param[in] uiLen:length of gc init bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_GcInit(const UINT32 *puiGcAddr, UINT32 uiLen);
/**
 * @brief global contrast Lut Init.
 * @param[in] puiGcLutAddr:default address of gc lut;
 * @param[in] puiGcLutAddr1:current address of gc lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_GcLutInit(const UINT32 *puiGcLutAddr, UINT32 *puiGcLutAddr1);
/**
 * @brief global contrast mode setting.
 * @param[in] ucGcMode:gc mode;
 * @param[in] ucCurBlkSta:;
 * @return VOID
 */
VOID Hv_Drv_PQ_GcModeSwitch(UCHAR8 ucGcMode, UCHAR8 ucCurBlkSta);
/**
 * @brief gc dma Enable.
 * @param[in] ucGCVDMEn:status of gc dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_GCVDMEn(UCHAR8 ucGCVDMEn);
/**
 * @brief gc Enable.
 * @param[in] ucGCEn:status of gc enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_GCEnable(UCHAR8 ucGCEn);
/**
 * @brief set gc DarkStabilizer Direction.
 * @param[in] ucDir:direction of DarkStabilizer;
 * @return VOID
 */
VOID Hv_Drv_PQ_GCSetDarkStaDir(UCHAR8 ucDir);
/**
 * @brief local dimming Lut Init.
 * @param[in] puiLdcLutAddr:default address of ldc lut;
 * @param[in] puiBlAddr:address backlight;
 * @return VOID
 */
VOID Hv_Drv_PQ_LdcLutInit(const UINT32 *puiLdcLutAddr, UINT32 *puiBlAddr);
/**
 * @brief local dimming Init.
 * @param[in] puiLdcAddr:address of ldc Init bin;
 * @param[in] uiLen:address of Init bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_LdcInit(const UINT32 *puiLdcAddr, UINT32 uiLen);
/**
 * @brief LocalDimming blend pwm
 * @param[in] uiPwmValue:value of pwm
 * @return VOID
 */
VOID Hv_Drv_PQ_LdcPwmBlend(UINT32 uiPwmValue);
/**
 * @brief set address of three mode lut
 * @param[in] pusLdcModeLutBaseAddr:default address of ldc mode lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_LdcSetModeLutAddr(const USHORT16 *pusLdcModeLutBaseAddr);
/**
 * @brief LocalDimming setting mode
 * @param[in] ucLdcModeIndx:value of mode
 * @param[in] usMaxWeightVal max weight value
 * @return VOID
 */
VOID Hv_Drv_PQ_LdcSetMode(UCHAR8 ucLdcModeIndex, USHORT16 usMaxWeightVal);
/**
 * @brief ldc dma Enable.
 * @param[in] ucLdcVDMEn:status of ldc dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LdcVDMEn(UCHAR8 ucLdcVDMEn);
/**
 * @brief calculation dynamic backlight PWM
 * @param[in] None 
 * @return value of PWM
 */
USHORT16 Hv_Drv_PQ_LdcCalcPWM();
/**
 * @brief get global average brightness 
 * @param[in] None 
 * @return value of average brightness
 */
UINT32 Hv_Drv_PQ_LDCGetGlobalAvgBright(VOID);
/**
 * @brief get global max brightness 
 * @param[in] None 
 * @return value of max brightness
 */
UINT32 Hv_Drv_PQ_LDCGetGlobalMaxBright(VOID);
/**
 * @brief LocalDimming bypass
 * @param[in] ucLdBypass:status of ldc bypass
 * @return VOID
 */
VOID Hv_Drv_PQ_SetLdBypass(UCHAR8 ucLdBypass);
/**
 * @brief Max Backlight setting
 * @param[in] value of Backlight
 * @return VOID
 */
VOID Hv_Drv_PQ_SetMaxBl(UCHAR8 ucMaxBl);
/**
 * @brief get ldim address of wdma
 * @param[in] ucBlBufId id of dma buffer
 * @return address of wdma.
 */
UINT32 Hv_Drv_PQ_GetLdimBlBufAddr(UCHAR8 ucBlBufId);
/**
 * @brief get Kspi address of rdma
 * @param[in] None
 * @return address of rdma.
 */
UINT32 Hv_Drv_PQ_GetKspiRdmaAddr(VOID);
/**
 * @brief set Kspi demo mode
 * @param[in] ucDemoMode demo mode of Kspi
 * @return VOID
 */
VOID Hv_Drv_PQ_SetKspiDemoMode(UCHAR8 ucDemoMode);
/**
 * @brief set Kspi demo data
 * @param[in] usDemoData demo data of Kspi
 * @return VOID
 */
VOID Hv_Drv_PQ_SetKspiDemoData(USHORT16 usDemoData);
/**
 * @brief set Kspi data length
 * @param[in] usDataLen length of Kspi data
 * @return VOID
 */
VOID Hv_Drv_PQ_SetKspiDataLen(USHORT16 usDataLen);
/**
 * @brief set Kspi header
 * @param[in] ucCh channel of spi
 * @param[in] ucHeaderNum number of header
 * @param[in] pusHeadrData point of head data
 * @return VOID
 */
VOID Hv_Drv_PQ_SetKspiHeader(UCHAR8 ucCh, UCHAR8 ucHeaderNum, USHORT16 *pusHeadrData);
/**
 * @brief set Kspi tail
 * @param[in] ucCh channel of spi
 * @param[in] ucTailNum number of tail
 * @param[in] pusTailData point of tail data
 * @return VOID
 */
VOID Hv_Drv_PQ_SetKspiTail(UCHAR8 ucCh, UCHAR8 ucTailNum, USHORT16 *pusTailData);
/**
 * @brief Kspi hard crc enable
 * @param[in] ucHardCrcEn enable of hard crc
 * @return VOID
 */
VOID Hv_Drv_PQ_KspiHardCrcEn(UCHAR8 ucHardCrcEn);
/**
 * @brief Kspi software mode enable
 * @param[in] ucSwModeEn enable of software mode
 * @return VOID
 */
VOID Hv_Drv_PQ_KspiSwModeEn(UCHAR8 ucSwModeEn);
/**
 * @brief Kspi enable
 * @param[in] ucKspiEn enable kspi
 * @return VOID
 */
VOID Hv_Drv_PQ_KspiEn(UCHAR8 ucKspiEn);
/**
 * @brief HDR Init.
 * @param[in] puiHdrAddr1:address of ldc init bin;
 * @param[in] ucHdrIdx:channel of HDR;
 * @return VOID
 */
VOID Hv_Drv_PQ_HdrInit(const UINT32 *puiHdrAddr1, UCHAR8 ucHdrIdx);

/**
 * @brief Get HDR Enable.
 * @param[in] ucCh:channel of HDR;
 * @return Hdr En Status 
 */
UCHAR8 Hv_Drv_PQ_GetHDREnable(UCHAR8 ucCh);
/**
 * @brief HDR Enable.
 * @param[in] ucCh:channel of HDR;
 * @param[in] ucHDREn:status of HDR enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_HDREnable(UCHAR8 ucCh, UCHAR8 ucHDREn);
/**
 * @brief set HDR mode.
 * @param[in] ucCh:channel of HDR;
 * @param[in] ucHdrModel:HDR mode;
 * @param[in] HDRParam* pstHdrParam
 * @return VOID
 */
VOID Hv_Drv_PQ_SetHdrMode(UCHAR8 ucCh, UCHAR8 ucHdrModel, HDRParam* pstHdrParam);
/**
 * @brief HDR dma Enable.
 * @param[in] ucCh:channel of HDR;
 * @param[in] ucHDRVDMEn:status of HDR dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_HDRVdmEnable(UCHAR8 ucCh, UCHAR8 ucHDRVDMEn);
/**
 * @brief set HDR mode.
 * @param[in] ucPstX:position x;
 * @param[in] ucPstY:position x;
 * @param[in] pucRed:red info;
 * @param[in] pucGreen:green info;
 * @param[in] pucBlue:blue info;
 * @return VOID
 */
VOID Hv_Drv_PQ_GetBlkAvg(USHORT16 usPstX, USHORT16 usPstY, UCHAR8* puiRed,UCHAR8* puiGreen, UCHAR8* puiBlue);
/**
 * @brief wcg Init.
 * @param[in] puiWcgAddr:address of wcg init bin;
 * @param[in] uiLen:length of wcg init bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_WcgInit(const UINT32 *puiWcgAddr, UINT32 uiLen);
/**
 * @brief wcg Lut Init.
 * @param[in] puiGmiAddr:default address of gmi lut;
 * @param[in] puiRgbAddr:current address of rgb lut;
 * @param[in] puiGmdAddr:default address of gmd lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_WcgLutInit(const UINT32 *puiGmiAddr, const UINT32 *puiRgbAddr, const UINT32 *puiGmdAddr);
/**
 * @brief wcg Enable.
 * @param[in] ucWcgEn:status of wcg enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_WcgEnable(UCHAR8 ucWcgEn);
/**
 * @brief WCG dma Enable.
 * @param[in] ucWCGVDMEn:status of ldc dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_WcgVdmEnable(UCHAR8 ucWCGVDMEn);
/**
 * @brief update WCG rgb lut.
 * @param[in] ucWCGVDMEn:status of ldc dma enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_WCGUpdateRgbLut(VOID);
/**
 * @brief set gamut.
 * @param[in] puiGamutAddr:address of gamut;
 * @param[in] ucGamut:id of gamut;
 * @return VOID
 */
VOID Hv_Drv_PQ_SetGamut(const UINT32 *puiGamutAddr, UCHAR8 ucGamut);
/**
 * @brief setting Gamut in factory mode
 * @param[in] stGamut paras of Gamut
 * @return VOID
 */
VOID Hv_Drv_PQ_SetGamutFac(GamutSet *stGamut);
/**
 * @brief setting OSD native Gamut 
 * @param[in] None
 * @return VOID
 */
VOID Hv_Drv_PQ_SetOsdGamutNative();
/**
 * @brief setting OSD native Gamut 
 * @param[in] None
 * @return VOID
 */
VOID Hv_Drv_PQ_SetGamutNative();
/**
 * @brief setting native Gamut 
 * @param[in] None
 * @return VOID
 */
VOID Hv_Drv_SetGamutEnable(VOID);
/**
 * @brief Enable WCG cm func.
 * @param[in] None;
 * @return None.
 */
VOID Hv_Drv_SetWCGLutEnable(VOID);
/**
 * @brief Gamut settting
 * @param[in] psGamut paras of Gamut
 * @return None
 */
VOID Hv_Drv_SetGamutParam(const GamutSet *psGamut);
/**
 * @brief Gamut offset settting
 * @param[in] psGamut paras of Gamut
 * @return None
 */
VOID Hv_Drv_PQ_SetGamutOffset(const GamutOffset *pstOffset);
/**
 * @brief load wcg rgb Lut.
 * @param[in] puiRgbAddr:address of wcg rgb lut;
 * @return VOID
 */
VOID Hv_Drv_LoadWCGLUT(const UINT32 *puiRgbAddr);
/**
 * @brief CSC Init.
 * @param[in] puiCscAddr:address of Csc Init bin;
 * @param[in] uiLen:address of Init bin;
 * @return VOID
 */
VOID Hv_Drv_PQ_CscInit(const UINT32 *puiCscAddr, UINT32 uiLen);
/**
 * @brief CSC config address.
 * @param[in] puiMainCscHdb:address of Csc main config;
 * @param[in] puiSubCscHdb:address of Csc sub config;
 * @return VOID
 */
VOID Hv_Drv_PQ_CscConfigAddr(const UINT32 *puiMainCscHdb, const UINT32 *puiSubCscHdb);
/**
 * @brief Contrast set
 * @param[in] ucCh channel id
 * @param[in] uiContrast:value of contrast
 * @return VOID
 */
VOID Hv_Drv_PQ_SetContrast(UCHAR8 ucCh, UINT32 uiContrast);
/**
 * @brief RGB Gain settting
 * @param[in] ucCh channel id
 * @param[in] usRed value of R Gain
 * @param[in] usGreen value of G Gain
 * @param[in] usBlue value of B Gain
 * @return VOID
 */
VOID Hv_Drv_PQ_SetRGBGain(UCHAR8 ucCh, USHORT16 usRed, USHORT16 usGreen, USHORT16 usBlue);
/**
 * @brief RGB offset settting
 * @param[in] ucCh channel id
 * @param[in] usRed value of R offset
 * @param[in] usGreen value of G offset
 * @param[in] usBlue value of B offset
 * @return VOID
 */
VOID Hv_Drv_PQ_SetRGBOffset(UCHAR8 ucCh, USHORT16 usRed, USHORT16 usGreen, USHORT16 usBlue);
/**
 * @brief Black Level set
 * @param[in] ucCh channel id
 * @param[in] usBlackLevel value of BlackLevel 
 * @return VOID
 */
VOID Hv_Drv_PQ_SetBlackLevel(UCHAR8 ucCh, USHORT16 usBlackLevel);
/**
 * @brief Saturation set
 * @param[in] ucCh channel id
 * @param[in] ucSaturation value of ucSaturation  
 * @return VOID
 */
VOID Hv_Drv_PQ_SetSaturation(UCHAR8 ucCh, UCHAR8 ucSaturation);
/**
 * @brief Hue set
 * @param[in] ucCh channel id
 * @param[in] ucHue value of ucHue  
 * @return VOID
 */
VOID Hv_Drv_PQ_SetHue(UCHAR8 ucCh, UCHAR8 ucHue);
/**
 * @brief BrightRange set
 * @param[in] ucCh channel id
 * @param[in] enRange value of BrightRange
 * @return VOID
 */
VOID Hv_Drv_PQ_SetBrightRange(UCHAR8 ucCh, UCHAR8 ucRange);
/**
 * @brief ColorSpace set
 * @param[in] ucCh channel id
 * @param[in] enColorSpace value of colorSpace
 * @return VOID
 */
VOID Hv_Drv_PQ_SetColorSpace(UCHAR8 ucCh, UCHAR8 ucColorSpace);
/**
 * @brief dither Init.
 * @param[in] puiDitherAddr:address of dither init bin;
 * @param[in] uiLen:length of puiDitherAddr;
 * @return VOID
 */
VOID Hv_Drv_PQ_DitherInit(const UINT32 *puiDitherAddr, UINT32 uiLen);
/**
 * @brief scaler Lut Init.
 * @param[in] puiScalerAddr:address of scaler lut;
 * @return VOID
 */
VOID Hv_Drv_PQ_ScalerUpLutInit(const UINT32 *puiScalerAddr);
/**
 * @brief Set different OSD Gamma 
 * @param[in] uiIndex: index of Gamma lut to be set
 * @return VOID
 */
VOID Hv_Drv_PQ_SetOsdGammaIndex(UCHAR8 ucIndex);
/**
 * @brief enable dynamic backlight
 * @param[in] ucEn: enable status
 * @return VOID
 */
VOID Hv_Drv_PQ_DynamicBLEn(UCHAR8 ucEn);
/**
 * @brief get dynamic backlight status
 * @param[in] None
 * @return enable status.
 */
UCHAR8 Hv_Drv_PQ_GetDynamicBLEn();
/**
 * @brief set PQ dma latch mode (active when vsync isr)
 * @param[in] None
 * @return None.
 */
VOID Hv_Drv_DpuPQ_DmaSetlatch(VOID);
/**
 * @brief PQ dma workaround
 * @param[in] None
 * @return None.
 */
VOID Hv_Drv_DpuPQ_DmaWorkaround(VOID);
/**
 * @brief PQ table dma enable
 * @param[in] bEn enable
 * @return None.
 */
VOID Hv_Drv_DpuPQ_DmaTableEnable(BOOL bEn);
/**
 * @brief PQ dma enable(implementation)
 * @param[in] bEn enable
 * @return None.
 */
VOID Hv_Drv_DpuPQ_DmaEnable(UCHAR8 ucEn);
/**
 * @brief get HDR pattern information
 * @param[in] None
 * @return info of HDR pattern.
 */
UCHAR8 Hv_Drv_DpuPQ_GetPattern();
/**
 * @brief HDR pattern process
 * @param[in] None
 * @return None.
 */
VOID Hv_Drv_DpuPQ_PatternDetProc();
/**
 * @brief HDR pattern detect enable
 * @param[in] ucEn value of enable
 * @return VOID
 */
VOID Hv_Drv_DpuPQ_PatternDetEn(UCHAR8 ucEn);
/**
 * @brief ambilight init
 * @param[in] None
 * @return None.
 */
VOID Hv_Drv_PQ_AmBilight_Init(VOID);
/**
 * @brief ambilight enable
 * @param[in] bEnable value of enable
 * @return None.
 */
VOID Hv_Drv_PQ_AmBilight_Enable(BOOL bEnable);
/**
 * @brief ambilight seting cell information
 * @param[in] ucHNum horizon num
 * @param[in] ucVNum vertical num
 * @param[in] pusHSizeTbl horizon table
 * @param[in] pusVSizeTbl vertical table
 * @return None.
 */
VOID Hv_Drv_PQ_AmBilight_SetCells(UCHAR8 ucHNum, UCHAR8 ucVNum, USHORT16 *pusHSizeTbl, USHORT16 *pusVSizeTbl);
/**
 * @brief ambilight dma enable
 * @param[in] bEnable value of dma enable
 * @return None.
 */
VOID Hv_Drv_PQ_AmBilight_DMAEnable(BOOL bEnable);
/**
 * @brief setting ambilight dma address
 * @param[in] pucAddr address of dma
 * @return None.
 */
VOID Hv_Drv_PQ_AmBilight_DMAWriterAddr(UINT32 *pucAddr);
/**
 * @brief setting ambilight dma parameters
 * @param[in] ucHNum horizon number
 * @param[in] ucHNum vertical number
 * @param[in] ucBurstLen dma burst length
 * @return None.
 */
VOID Hv_Drv_PQ_AmBilight_DMAWriteSetting(UCHAR8 ucHNum, UCHAR8 ucVNum, UCHAR8 ucBurstLen);
/**
 * @brief setting brightness value
 * @param[in] pBrightnessConfigValue value of brightness
 * @return None.
 */
VOID Hv_Drv_SetBrightnessConfigValue(const BrightnessOsdSet *pBrightnessConfigValue);
/**
 * @brief CM64（for CM debug by tool）setting sat.
 * @param[in] ucIndex:index of sat(0-63);
 * @param[in] ucOffset:value of sat setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMFineTune_Sat(UCHAR8 ucIndex, UCHAR8 ucOffset);
/**
 * @brief CM64（for CM debug by tool）setting hue.
 * @param[in] ucIndex:index of hue(0-63);
 * @param[in] ucOffset:value of hue setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMFineTune_Hue(UCHAR8 ucIndex, UCHAR8 ucOffset);
/**
 * @brief CM64（for CM debug by tool）setting lum.
 * @param[in] ucIndex:index of lum(0-63);
 * @param[in] ucOffset:value of lum setting;
 * @return VOID
 */
VOID Hv_Drv_PQ_CMFineTune_Lum(UCHAR8 ucIndex, UCHAR8 ucOffset);
/**
 * @brief CM change Lut
 * @param[in] ucIndex:id of CM lut 
 * @return VOID
 */
VOID Hv_Drv_PQ_CMChangeLut(UINT32 ucLutAddr);

/**
 * @brief inp pattern En
 * @param[in] ucEn
 * @return VOID
 */

VOID Hv_Drv_PQ_SetInpPattEn(UCHAR8 ucEn);

/**
 * @brief Inp pattern Color
 * @param[in] USHORT16 usRed, USHORT16 usGreen, USHORT16 usBlue
 * @return VOID
 */
VOID Hv_Drv_PQ_SetInpPatColor(USHORT16 usRed, USHORT16 usGreen, USHORT16 usBlue);

/**
 * @brief Kspi send data in software mode
 * @param[in] ucCh channel of spi
 * @param[in] puiData point of data
 * @param[in] uiLength length of 32bit data
 * @param[in] ucLastChFlag flag of last channel
 * @return None.
 */
VOID Hv_Drv_PQ_KspiSwSendData(UCHAR8 ucCh, UINT32* puiData, UINT32 uiLength, UCHAR8 ucLastChFlag);
/**
 * @brief Kspi send data init before copying data to sram
 * @param[in] None
 * @return None.
 */
VOID Hv_Drv_PQ_KspiSwSendDataInit(VOID);
/**
 * @brief start Kspi sendingin software mode
 * @param[in] none
 * @return None.
 */
VOID Hv_Drv_PQ_KspiSwSendDataStart(VOID);
/**
 * @brief Set ldc spf curve
 * @param[in] ucY0 value of y0
 * @param[in] ucY1 value of y1
 * @return None.
 */
VOID Hv_Drv_PQ_LDC_SetCurveY(UCHAR8 ucY0, UCHAR8 ucY1);
/**
 * @brief ldc Enable.
 * @param[in] ucEn:status of enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LDC_LdcEn(UCHAR8 ucEn);
/**
 * @brief space filter Enable.
 * @param[in] ucEn:status of enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LDC_SpaceFilterEn(UCHAR8 ucEn);
/**
 * @brief time filter Enable.
 * @param[in] ucEn:status of enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LDC_TimeFilterEn(UCHAR8 ucEn);
/**
 * @brief blgamma Enable.
 * @param[in] ucEn:status of enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LDC_BlgammaEn(UCHAR8 ucEn);
/**
 * @brief pixelgain Enable.
 * @param[in] ucEn:status of enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LDC_PixelgainEn(UCHAR8 ucEn);
/**
 * @brief blgamma1 Enable.
 * @param[in] ucEn:status of enable;
 * @return VOID
 */
VOID Hv_Drv_PQ_LDC_Blgamma1En(UCHAR8 ucEn);
/**
 * @brief Hdr ToneMapping Init
 * @param[in] ucMapType:Map type
 * @param[in] uiMapLutAddr:Mapping lut  Addr
 * @return None.
 */
VOID Hv_Drv_PQ_HdrToneMappingInit(UCHAR8 ucMapType, UINT32 uiMapLutAddr);

VOID Hv_Drv_PQ_HdrAuthProcess(const HDRParam* pstHdrParam);

VOID Hv_Drv_PQ_PatDetInit(USHORT16 ** puiData, UCHAR8 ucPatNum, UCHAR8 ucPatW, UCHAR8 ucPatH);

VOID Hv_Drv_PQ_GammaBypass(BOOL bEn);

VOID Hv_Drv_PQ_LDCPrintPattern();
VOID Hv_Drv_PQ_ColorBypass(BOOL bEn);
VOID Hv_Drv_PQ_HDREnableFlag(UCHAR8 ucCh, UCHAR8 ucHDREn);

VOID Hv_Drv_PQ_SetHSRXCursorEnable(BOOL bEn);
VOID Hv_Drv_PQ_SetHSRXCursorWidth(UCHAR8 ucHwidth, UCHAR8 ucVwidth);
VOID Hv_Drv_PQ_SetHSRXCursorPos(USHORT16 usHcnt, USHORT16 usVcnt);
VOID Hv_Drv_PQ_GetHSRXCursorBdColor(UCHAR8 *pucR, UCHAR8 *pucG, UCHAR8 *pucB);

VOID Hv_Drv_PQ_SetSrpCursorEnable(BOOL bEn);
VOID Hv_Drv_PQ_SetSrpCursorWidth(UCHAR8 ucHwidth, UCHAR8 ucVwidth);
VOID Hv_Drv_PQ_SetSrpCursorPos(USHORT16 usHcnt, USHORT16 usVcnt);
VOID Hv_Drv_PQ_GetSrpCursorColor(UCHAR8 *pucR, UCHAR8 *pucG, UCHAR8 *pucB);

VOID Hv_Drv_PQ_SetLdgCursorEnable(BOOL bEn);
VOID Hv_Drv_PQ_SetLdgCursorWidth(UCHAR8 ucHwidth, UCHAR8 ucVwidth);
VOID Hv_Drv_PQ_SetLdgCursorPos(USHORT16 usHcnt, USHORT16 usVcnt);
VOID Hv_Drv_PQ_GetLdgCursorColor(UCHAR8 *pucR, UCHAR8 *pucG, UCHAR8 *pucB);

VOID Hv_Drv_PQ_SetDispCtrlPreCursorEnable(BOOL bEn);
VOID Hv_Drv_PQ_SetDispCtrlPreCursorWidth(UCHAR8 ucHwidth, UCHAR8 ucVwidth);
VOID Hv_Drv_PQ_SetDispCtrlPreCursorPos(USHORT16 usHcnt, USHORT16 usVcnt);
VOID Hv_Drv_PQ_GetDispCtrlPreCursorBdColor(UCHAR8 *pucR, UCHAR8 *pucG, UCHAR8 *pucB);

VOID Hv_Drv_PQ_SetTXPostCursorEnable(BOOL bEn);
VOID Hv_Drv_PQ_SetTXPostCursorWidth(UCHAR8 ucHwidth, UCHAR8 ucVwidth);
VOID Hv_Drv_PQ_SetTXPostCursorPos(USHORT16 usHcnt, USHORT16 usVcnt);
VOID Hv_Drv_PQ_GetTXPostCursorFdColor(UCHAR8 *pucR, UCHAR8 *pucG, UCHAR8 *pucB);
VOID Hv_Drv_PQ_GetTXPostCursorBdColor(UCHAR8 *pucR, UCHAR8 *pucG, UCHAR8 *pucB);

USHORT16 Hv_Drv_PQ_GetBlackLevel(UCHAR8 ucCh);
USHORT16 Hv_Drv_PQ_GetContrast(UCHAR8 ucCh);
VOID Hv_Drv_PQ_SetSharpnessReverse(UCHAR8 ucSharpness);
VOID Hv_Drv_PQ_SetHdrGmiLut(UCHAR8 ucHdrIdx, UINT32 uiHdrGmiLutAddr);
VOID Hv_Drv_PQ_LDCPrintSumDiff();
VOID Hv_Drv_PQ_LDCSetPatThr(UINT32 uiThr);
VOID Hv_Drv_PQ_ReconfigPQSize(const VideoConfigParams* pstVideoConfigParams);
VOID Hv_Drv_PQ_DdcciGammaPrepare();
VOID Hv_Drv_PQ_DdcciGammaFinish();
VOID Hv_Drv_PQ_DdcciColorSpacePrepare();
VOID Hv_Drv_PQ_DdcciWcgEnable(BOOL bEn);
VOID Hv_Drv_PQ_DdcciWriteColorSpaceData(USHORT16* pusData);
VOID Hv_Drv_PQ_DdcciColorSpaceFinish();
VOID Hv_Drv_PQ_DdcciColorTempPrepare();
VOID Hv_Drv_PQ_DdcciColorTempFinish();
VOID Hv_Drv_PQ_DdcciPatternPrepare(VOID);
VOID Hv_Drv_PQ_DdcciPatternFinish(VOID);
VOID Hv_Drv_PQ_DdcciTrainingStart(VOID);
VOID Hv_Drv_PQ_DdcciSetGamma(BOOL bEn);
UCHAR8 Hv_Drv_PQ_DdcciGetGamma();
VOID Hv_Drv_PQ_DdcciSetWcg(UCHAR8 ucData);
UCHAR8 Hv_Drv_PQ_DdcciGetWcg();
VOID Hv_Drv_PQ_DdcciSetLdg(UCHAR8 ucData);
UCHAR8 Hv_Drv_PQ_DdcciGetLdg();
UCHAR8 Hv_Drv_PQ_DdcciGetHdr();
VOID Hv_Drv_PQ_DdcciSetHdr(UCHAR8 ucData);
VOID Hv_Drv_PQ_MhiInit();
VOID Hv_Drv_MhiSetPos(USHORT16 usStartX, USHORT16 usStartY, USHORT16 usWidth, USHORT16 usHeight);

UINT32* Hv_Drv_PQ_GetMhi16();

VOID Hv_Drv_PQ_PWM(VOID);


VOID Hv_Drv_PQ_GCLutExpand(USHORT16 *pusInput, UCHAR8 ucCnt);
VOID Hv_Drv_PQ_SetBrightRangeY(UCHAR8 ucCh, UCHAR8 ucRange);
#endif
