/*******************************************************************

 *******************************************************************/

#ifndef FRAME_H
#define FRAME_H

#define UCHAR_CLIP_TABLE_OFFSET 384

typedef struct {
	int height;
	int width;

	unsigned char *y;
	unsigned char *u;
	unsigned char *v;
} FRAME;

#ifdef __cplusplus
extern "C" {
#endif

#ifndef FRAME_C
extern const unsigned char uchar_clip_table[1024];	
extern FRAME *new_frame(int width, int height);
extern void delete_frame(FRAME *p);
extern void yuv_420_to_422(FRAME *p);
extern void yuv_422_to_444(FRAME *p);
extern void frame_to_bgr(FRAME *in, unsigned char *out, int chroma_format, int progressive, int type);
extern void save_frame_bmp(FRAME *in, int frame_count, int chroma_format, int progressive, int conv_type);
#endif
	
#ifdef __cplusplus
}
#endif

#endif