1 /* 2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 27 #ifndef __MLIB_C_IMAGECONV_H 28 #define __MLIB_C_IMAGECONV_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif /* __cplusplus */ 33 34 // Shared macro defined for cleanup of allocated memory. 35 #ifndef FREE_AND_RETURN_STATUS 36 #define FREE_AND_RETURN_STATUS \ 37 { \ 38 if (pbuff != buff) mlib_free(pbuff); \ 39 if (k != akernel) mlib_free(k); \ 40 return status; \ 41 } 42 #endif /* FREE_AND_RETURN_STATUS */ 43 44 mlib_status mlib_c_convMxNnw_u8(mlib_image *dst, 45 const mlib_image *src, 46 const mlib_s32 *kernel, 47 mlib_s32 m, 48 mlib_s32 n, 49 mlib_s32 dm, 50 mlib_s32 dn, 51 mlib_s32 scale, 52 mlib_s32 cmask); 53 54 mlib_status mlib_c_convMxNext_u8(mlib_image *dst, 55 const mlib_image *src, 56 const mlib_s32 *kern, 57 mlib_s32 m, 58 mlib_s32 n, 59 mlib_s32 dx_l, 60 mlib_s32 dx_r, 61 mlib_s32 dy_t, 62 mlib_s32 dy_b, 63 mlib_s32 scale, 64 mlib_s32 cmask); 65 66 #if ! defined ( __sparc ) /* for x86, using integer multiplies is faster */ 67 68 mlib_status mlib_i_convMxNnw_s16(mlib_image *dst, 69 const mlib_image *src, 70 const mlib_s32 *kernel, 71 mlib_s32 m, 72 mlib_s32 n, 73 mlib_s32 dm, 74 mlib_s32 dn, 75 mlib_s32 scale, 76 mlib_s32 cmask); 77 78 mlib_status mlib_i_convMxNnw_u16(mlib_image *dst, 79 const mlib_image *src, 80 const mlib_s32 *kernel, 81 mlib_s32 m, 82 mlib_s32 n, 83 mlib_s32 dm, 84 mlib_s32 dn, 85 mlib_s32 scale, 86 mlib_s32 cmask); 87 88 mlib_status mlib_i_convMxNnw_u8(mlib_image *dst, 89 const mlib_image *src, 90 const mlib_s32 *kernel, 91 mlib_s32 m, 92 mlib_s32 n, 93 mlib_s32 dm, 94 mlib_s32 dn, 95 mlib_s32 scale, 96 mlib_s32 cmask); 97 98 mlib_status mlib_i_convMxNext_u8(mlib_image *dst, 99 const mlib_image *src, 100 const mlib_s32 *kern, 101 mlib_s32 m, 102 mlib_s32 n, 103 mlib_s32 dx_l, 104 mlib_s32 dx_r, 105 mlib_s32 dy_t, 106 mlib_s32 dy_b, 107 mlib_s32 scale, 108 mlib_s32 cmask); 109 110 mlib_status mlib_i_convMxNext_s16(mlib_image *dst, 111 const mlib_image *src, 112 const mlib_s32 *kernel, 113 mlib_s32 m, 114 mlib_s32 n, 115 mlib_s32 dx_l, 116 mlib_s32 dx_r, 117 mlib_s32 dy_t, 118 mlib_s32 dy_b, 119 mlib_s32 scale, 120 mlib_s32 cmask); 121 122 mlib_status mlib_i_convMxNext_u16(mlib_image *dst, 123 const mlib_image *src, 124 const mlib_s32 *kernel, 125 mlib_s32 m, 126 mlib_s32 n, 127 mlib_s32 dx_l, 128 mlib_s32 dx_r, 129 mlib_s32 dy_t, 130 mlib_s32 dy_b, 131 mlib_s32 scale, 132 mlib_s32 cmask); 133 134 #endif /* ! defined ( __sparc ) ( for x86, using integer multiplies is faster ) */ 135 136 #ifdef __cplusplus 137 } 138 #endif /* __cplusplus */ 139 #endif /* __MLIB_C_IMAGECONV_H */