#ifndef DISPARITY_H_
#define DISPARITY_H_
/**
 * \file disparity.h
 * \brief The header for disparity.c
 *
 *
 * \ingroup corefiles
 * \date May 13, 2009
 * \author: Alexander Pimenov
 */
#ifdef __cplusplus
	extern "C" {
#endif

#include "stdint.h"

/**
 * Indicates that disparity is unknown for the particular pixel
 */
#define DISPARITY_UNKNOWN 0xFFFF

#define DISPARITY_MAX_SANE 0xFFFE

/**
 * \brief this buffer stores the disparity data
 *
 */
typedef struct DisparityBuffer_TAG {
	int h;              /**< Height of the buffer */
	int w;              /**< Width of the buffer */
	uint16_t maxValue;  /**< Maximum possible value for the data entry */
	uint16_t *data;     /**< The data of the normalized disparities */
} DisparityBuffer;

DisparityBuffer *disparityBufferCreate(int h, int w);

void disparityBufferDelete(DisparityBuffer *toDelete);

#ifdef __cplusplus
	} // 	extern "C"
#endif
#endif /* DISPARITY_H_ */
