#ifndef _PROFILE_DATA_CONVERT_H_
#define _PROFILE_DATA_CONVERT_H_
#include <vector>
#include "LJX8_IF_Linux.h"
#define PP_ERR_NONE (0)
#define PP_ERR_ARGUMENT (1)
#define PROFILE_HEADER_SIZE_IN_INT (6)
#define BRIGHTNESS_VALUE (0x40)
#define DEF_NOTIFY_MAGIC_NO (0xFFFFFFFFU)
#define DEF_PROF_ALARM_20 (524288)
#define DEF_PROF_INVALID_20 (524289)
#define DEF_PROF_BLIND_20 (524290)
#define DEF_PROF_UNPROCESS_20 (524291)
#define DEF_PROF_ALARM (-2147483647-1)
#define DEF_PROF_INVALID (-2147483647)
#define DEF_PROF_BLIND (-2147483646)
#define DEF_PROF_UNPROCESS (-2147483645)
#define DEF_PROF_VALIDDATA_MIN (-2147483644)
class ProfileDataConvert
{
public:
static unsigned char ConvertProfileData20to32(const unsigned char profileType, const unsigned short wProfCnt, const unsigned short wUnit, const void* const profileData, int* convertedZProfile);
static void ConvertProfileData32to16AsSimpleArray(int* pdwBatchData, unsigned short profileSize, int withLuminance, unsigned int getProfileCount, unsigned short zUnit, LJX8IF_PROFILE_HEADER* pProfileHeaderArray, unsigned short* pHeightProfileArray, unsigned short* pLuminanceProfileArray);
static int ConvertProfileData(unsigned char dataCount, unsigned char byResProfType, int nProfileDataMargin, const unsigned short wProfCnt,const unsigned short wUnit,const void* pInData, unsigned int* pOutZProf, unsigned int dwDataSize);
static unsigned char GetProfileCount(unsigned char byKind);
private:
static void Convert20to32(const unsigned int dataSize, const unsigned int* readData, unsigned int* readPosition, unsigned int* brightnessOffset, unsigned int* convertedData);
};
#endif