/*
 * image_serializer.h
 *
 */

#ifndef IMAGE_SERIALIZER_H_
#define IMAGE_SERIALIZER_H_

#include <stdint.h>

#include "grifo_image_serializer.h"

class GrifoImageSerializer
{
public:

	static void rectifiedImageCommit(unsigned int bpp, const uint8_t* data, unsigned int stride, unsigned int dy, float heading, float latitude, float longitude, float meters_per_pixel);

	static void mfdImageCommit(const uint8_t* data, unsigned int dx, unsigned int dy, unsigned int stride);

	//static void mfdImageCommit(const uint8_t* data, unsigned int dx, unsigned int dy, unsigned int ox, unsigned int stride);
};

#if 0
extern void GrifoMfdSerializer(const uint32_t* palette, const uint8_t* data, unsigned int dx, unsigned int dy, unsigned int stride);

extern void GrifoImageSerializerSetReservedData(unsigned int type, void* p, unsigned int max_size) __attribute__((weak));

extern void GrifoImageSerializerSetInfoData(unsigned int type, void* p, unsigned int max_size) __attribute__((weak));

struct GrifoImageSerializerHeaderData
{
	uint8_t image_type;				//Synthetic MFD image or raw SAR image
	uint8_t image_subtype;			//Synthetic MFD with or without background raw map or SAR image
	uint8_t image_logical_color;	//number of color map colors used for synthetic graphics, from 0..(image_logical_color-1), while image_logical_color..255 are associated to the background map
	uint8_t image_reserved;

	uint32_t image_producer_info[2];
	uint32_t tod[2];

	uint32_t timetag_us64;
};

extern void GrifoImageSerializerGetHeaderData(unsigned int type, GrifoImageSerializerHeaderData* h) __attribute__((weak));
#endif

#endif /* IMAGE_SERIALIZER_H_ */
