


#ifndef _MHAL_FGS_IF_H_
#define _MHAL_FGS_IF_H_


#ifdef _MHAL_FGS_IF_C_
#ifndef INTERFACE
#define INTERFACE
#endif
#else
#ifndef INTERFACE
#define INTERFACE extern
#endif
#endif

#include "MsTypes.h"

// Film Grain API for input

typedef struct _STU_FGAPI_IN
{
    //MS_U32 u32Version; //<Version of current structure
    //MS_U16 u16Length;  //<Length of this structure
    MS_U8 *pu8Metadata;

}STU_FGAPI_IN;

// Film Grain REG and ADL Output

typedef struct _STU_FG_Reg_Table
{
    MS_U32 u32Depth;
    MS_U32 *pu32Address;
    MS_U16 *pu16Value;
    MS_U16 *pu16Mask;
    MS_U16 *pu16Client;

} STU_FG_Reg_Table;


typedef struct _STU_FG_Adl_Table
{
    MS_U16 u16client;
    MS_U8 *pu8Data;
    MS_U32 u32Size;

} STU_FG_Adl_Table;

typedef struct _STU_FG_OUTPUT_STATUS
{
    MS_U32 u32Version;
    MS_U16 u16Length;
    MS_U16 u16UpdateStatus;

} STU_FG_OUTPUT_STATUS;

typedef struct _STU_FGAPI_REGISTER_TABLE
{
    MS_U32 u32Version;
    MS_U16 u16Length;
    STU_FG_Reg_Table stu_REG_TBL;
    STU_FG_Adl_Table stu_ADL_TBL;
    STU_FG_OUTPUT_STATUS stuStatus;

} STU_FGAPI_TABLE;

typedef struct _STU_FGAPI_OUT
{
    MS_U32 u32Version;
    MS_U16 u16Length;
    STU_FGAPI_TABLE stFilmGrainTable;

}STU_FGAPI_OUT;


MS_BOOL MApi_FGS_Handler(STU_FGAPI_IN* pst_FGSIn, STU_FGAPI_OUT* pst_FGSOut);

#undef INTERFACE
#endif // _MHAL_FGS_IF_H_