/*
 *******************************************************************************
 *  Copyright (c) 2010-2022 VATICS(KNERON) Inc. All rights reserved.
 *
 *  +-----------------------------------------------------------------+
 *  | THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED |
 *  | AND COPIED IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH  |
 *  | A LICENSE AND WITH THE INCLUSION OF THE THIS COPY RIGHT NOTICE. |
 *  | THIS SOFTWARE OR ANY OTHER COPIES OF THIS SOFTWARE MAY NOT BE   |
 *  | PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. THE   |
 *  | OWNERSHIP AND TITLE OF THIS SOFTWARE IS NOT TRANSFERRED.        |
 *  |                                                                 |
 *  | THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT   |
 *  | ANY PRIOR NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY |
 *  | VATICS(KNERON) INC.                                             |
 *  +-----------------------------------------------------------------+
 *
 *******************************************************************************
 */
#ifndef EDGE_FILTER_H
#define EDGE_FILTER_H

#ifdef __cplusplus
extern "C" {
#endif //__cplusplus

/**
 * An enumeration for EDGE Filter type
 */
typedef enum {
	VMF_EDGE_FILTER_3x3 = 0,     //! 3x3 mode : 1x
	VMF_EDGE_FILTER_5x5 = 1,     //! 5x5 mode : 1x
	VMF_EDGE_FILTER_3x3_5_4 = 2, //! 3x3 mode : 1.25x
	VMF_EDGE_FILTER_5x5_5_4 = 3, //! 5x5 mode : 1.25x
	VMF_EDGE_FILTER_3x3_3_2 = 4, //! 3x3 mode : 1.5x
	VMF_EDGE_FILTER_5x5_3_2 = 5, //! 5x5 mode : 1.5x
	VMF_EDGE_FILTER_3x3_7_4 = 6, //! 3x3 mode : 1.75x
	VMF_EDGE_FILTER_5x5_7_4 = 7, //! 5x5 mode : 1.75x
	VMF_EDGE_FILTER_MAX
} VMF_EDGE_FILTER_TYPE;

/**
 * @brief Function to edge filter.
 *
 * @param[in] The destination buffer 
 * @param[in] The source buffer 
 * @param[in] The picture width 
 * @param[in] The picture height
 * @param[in] The edge filter type 
 * @return 0 with no errors, -1 otherwise
 */
int VMF_EDGE_Filter(uint8_t *pbyDst, const uint8_t *pbySrc, uint32_t dwWidth,
		uint32_t dwHeight, VMF_EDGE_FILTER_TYPE eEdgeType);

#ifdef __cplusplus
}
#endif //__cplusplus

#endif // EDGE_FILTER_H
