Path: blob/master/src/java.desktop/share/native/libmlib_image/mlib_ImageConv.h
41149 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/242526#ifndef __MLIB_IMAGECONV_H27#define __MLIB_IMAGECONV_H2829#ifdef __cplusplus30extern "C" {31#endif /* __cplusplus */3233// Shared macro defined for cleanup of allocated memory.34#ifndef FREE_AND_RETURN_STATUS35#define FREE_AND_RETURN_STATUS \36if (pbuff != buff) mlib_free(pbuff); \37if (k != akernel) mlib_free(k); \38return status39#endif /* FREE_AND_RETURN_STATUS */4041mlib_status mlib_convMxNext_s32(mlib_image *dst,42const mlib_image *src,43const mlib_s32 *kernel,44mlib_s32 m,45mlib_s32 n,46mlib_s32 dx_l,47mlib_s32 dx_r,48mlib_s32 dy_t,49mlib_s32 dy_b,50mlib_s32 scale,51mlib_s32 cmask);5253mlib_status mlib_convMxNnw_d64(mlib_image *dst,54const mlib_image *src,55const mlib_d64 *ker,56mlib_s32 m,57mlib_s32 n,58mlib_s32 dm,59mlib_s32 dn,60mlib_s32 cmask);6162mlib_status mlib_convMxNnw_f32(mlib_image *dst,63const mlib_image *src,64const mlib_d64 *ker,65mlib_s32 m,66mlib_s32 n,67mlib_s32 dm,68mlib_s32 dn,69mlib_s32 cmask);7071mlib_status mlib_convMxNnw_s16(mlib_image *dst,72const mlib_image *src,73const mlib_s32 *kernel,74mlib_s32 m,75mlib_s32 n,76mlib_s32 dm,77mlib_s32 dn,78mlib_s32 scale,79mlib_s32 cmask);8081mlib_status mlib_convMxNnw_s32(mlib_image *dst,82const mlib_image *src,83const mlib_s32 *kernel,84mlib_s32 m,85mlib_s32 n,86mlib_s32 dm,87mlib_s32 dn,88mlib_s32 scale,89mlib_s32 cmask);9091mlib_status mlib_convMxNnw_u16(mlib_image *dst,92const mlib_image *src,93const mlib_s32 *kernel,94mlib_s32 m,95mlib_s32 n,96mlib_s32 dm,97mlib_s32 dn,98mlib_s32 scale,99mlib_s32 cmask);100101mlib_s32 mlib_ImageConvVersion(mlib_s32 m,102mlib_s32 n,103mlib_s32 scale,104mlib_type type);105106mlib_status mlib_ImageConvMxN_f(mlib_image *dst,107const mlib_image *src,108const void *kernel,109mlib_s32 m,110mlib_s32 n,111mlib_s32 dm,112mlib_s32 dn,113mlib_s32 scale,114mlib_s32 cmask,115mlib_edge edge);116117mlib_status mlib_convMxNnw_u8(mlib_image *dst,118const mlib_image *src,119const mlib_s32 *kern,120mlib_s32 m,121mlib_s32 n,122mlib_s32 dm,123mlib_s32 dn,124mlib_s32 scale,125mlib_s32 cmask);126127mlib_status mlib_convMxNext_u8(mlib_image *dst,128const mlib_image *src,129const mlib_s32 *kern,130mlib_s32 m,131mlib_s32 n,132mlib_s32 dx_l,133mlib_s32 dx_r,134mlib_s32 dy_t,135mlib_s32 dy_b,136mlib_s32 scale,137mlib_s32 cmask);138139mlib_status mlib_convMxNext_s16(mlib_image *dst,140const mlib_image *src,141const mlib_s32 *kernel,142mlib_s32 m,143mlib_s32 n,144mlib_s32 dx_l,145mlib_s32 dx_r,146mlib_s32 dy_t,147mlib_s32 dy_b,148mlib_s32 scale,149mlib_s32 cmask);150151mlib_status mlib_convMxNext_u16(mlib_image *dst,152const mlib_image *src,153const mlib_s32 *kernel,154mlib_s32 m,155mlib_s32 n,156mlib_s32 dx_l,157mlib_s32 dx_r,158mlib_s32 dy_t,159mlib_s32 dy_b,160mlib_s32 scale,161mlib_s32 cmask);162163mlib_status mlib_convMxNext_f32(mlib_image *dst,164const mlib_image *src,165const mlib_d64 *kernel,166mlib_s32 m,167mlib_s32 n,168mlib_s32 dx_l,169mlib_s32 dx_r,170mlib_s32 dy_t,171mlib_s32 dy_b,172mlib_s32 cmask);173174mlib_status mlib_convMxNext_d64(mlib_image *dst,175const mlib_image *src,176const mlib_d64 *kernel,177mlib_s32 m,178mlib_s32 n,179mlib_s32 dx_l,180mlib_s32 dx_r,181mlib_s32 dy_t,182mlib_s32 dy_b,183mlib_s32 cmask);184185#ifdef __cplusplus186}187#endif /* __cplusplus */188#endif /* __MLIB_IMAGECONV_H */189190191