#ifndef _SOBEL_H_
#define _SOBEL_H_
#include "ap_bmp.h"
#include "ap_axi_sdata2.h"
#include "ap_int.h"
#include "ap_utils.h"
#include "ap_video.h"

#define MAX_WIDTH  1920
#define MAX_HEIGHT 1080

#define SECTORS    16

#define ABSDIFF(x,y)	((x>y)? x - y : y - x)
#define ABS(x)          ((x>0)? x : -x)
#define RGB(r,g,b) ((((word)r)<<16)|(((word)g)<<8)|((word)b))

typedef ap_rgb <8, 8, 8> RGB;
typedef ap_axiu2 <32, 1, 1, 1> AXI_PIXEL;

typedef ap_linebuffer <unsigned char, 4, (MAX_WIDTH/SECTORS)+2> LINE4_SECTOR_BUFFER;
typedef ap_linebuffer <RGB, 1, (MAX_WIDTH/SECTORS)+1> LINE1_SECTOR_BUFFER;

int sobel_filter(AXI_PIXEL STREAM_IN[MAX_WIDTH],
                 AXI_PIXEL STREAM_OUT[MAX_WIDTH],
                 int rows,
                 int cols,
                 int packet_mode_en,
                 int packet_size);

#endif
