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_IMAGECONV_H 28 #define __MLIB_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 if (pbuff != buff) mlib_free(pbuff); \ 38 if (k != akernel) mlib_free(k); \ 39 return status 40 #endif /* FREE_AND_RETURN_STATUS */ 41 42 mlib_status mlib_convMxNext_s32(mlib_image *dst, 43 const mlib_image *src, 44 const mlib_s32 *kernel, 45 mlib_s32 m, 46 mlib_s32 n, 47 mlib_s32 dx_l, 48 mlib_s32 dx_r, 49 mlib_s32 dy_t, 50 mlib_s32 dy_b, 51 mlib_s32 scale, 52 mlib_s32 cmask); 53 54 mlib_status mlib_convMxNnw_d64(mlib_image *dst, 55 const mlib_image *src, 56 const mlib_d64 *ker, 57 mlib_s32 m, 58 mlib_s32 n, 59 mlib_s32 dm, 60 mlib_s32 dn, 61 mlib_s32 cmask); 62 63 mlib_status mlib_convMxNnw_f32(mlib_image *dst, 64 const mlib_image *src, 65 const mlib_d64 *ker, 66 mlib_s32 m, 67 mlib_s32 n, 68 mlib_s32 dm, 69 mlib_s32 dn, 70 mlib_s32 cmask); 71 72 mlib_status mlib_convMxNnw_s16(mlib_image *dst, 73 const mlib_image *src, 74 const mlib_s32 *kernel, 75 mlib_s32 m, 76 mlib_s32 n, 77 mlib_s32 dm, 78 mlib_s32 dn, 79 mlib_s32 scale, 80 mlib_s32 cmask); 81 82 mlib_status mlib_convMxNnw_s32(mlib_image *dst, 83 const mlib_image *src, 84 const mlib_s32 *kernel, 85 mlib_s32 m, 86 mlib_s32 n, 87 mlib_s32 dm, 88 mlib_s32 dn, 89 mlib_s32 scale, 90 mlib_s32 cmask); 91 92 mlib_status mlib_convMxNnw_u16(mlib_image *dst, 93 const mlib_image *src, 94 const mlib_s32 *kernel, 95 mlib_s32 m, 96 mlib_s32 n, 97 mlib_s32 dm, 98 mlib_s32 dn, 99 mlib_s32 scale, 100 mlib_s32 cmask); 101 102 mlib_s32 mlib_ImageConvVersion(mlib_s32 m, 103 mlib_s32 n, 104 mlib_s32 scale, 105 mlib_type type); 106 107 mlib_status mlib_ImageConvMxN_f(mlib_image *dst, 108 const mlib_image *src, 109 const void *kernel, 110 mlib_s32 m, 111 mlib_s32 n, 112 mlib_s32 dm, 113 mlib_s32 dn, 114 mlib_s32 scale, 115 mlib_s32 cmask, 116 mlib_edge edge); 117 118 mlib_status mlib_convMxNnw_u8(mlib_image *dst, 119 const mlib_image *src, 120 const mlib_s32 *kern, 121 mlib_s32 m, 122 mlib_s32 n, 123 mlib_s32 dm, 124 mlib_s32 dn, 125 mlib_s32 scale, 126 mlib_s32 cmask); 127 128 mlib_status mlib_convMxNext_u8(mlib_image *dst, 129 const mlib_image *src, 130 const mlib_s32 *kern, 131 mlib_s32 m, 132 mlib_s32 n, 133 mlib_s32 dx_l, 134 mlib_s32 dx_r, 135 mlib_s32 dy_t, 136 mlib_s32 dy_b, 137 mlib_s32 scale, 138 mlib_s32 cmask); 139 140 mlib_status mlib_convMxNext_s16(mlib_image *dst, 141 const mlib_image *src, 142 const mlib_s32 *kernel, 143 mlib_s32 m, 144 mlib_s32 n, 145 mlib_s32 dx_l, 146 mlib_s32 dx_r, 147 mlib_s32 dy_t, 148 mlib_s32 dy_b, 149 mlib_s32 scale, 150 mlib_s32 cmask); 151 152 mlib_status mlib_convMxNext_u16(mlib_image *dst, 153 const mlib_image *src, 154 const mlib_s32 *kernel, 155 mlib_s32 m, 156 mlib_s32 n, 157 mlib_s32 dx_l, 158 mlib_s32 dx_r, 159 mlib_s32 dy_t, 160 mlib_s32 dy_b, 161 mlib_s32 scale, 162 mlib_s32 cmask); 163 164 mlib_status mlib_convMxNext_f32(mlib_image *dst, 165 const mlib_image *src, 166 const mlib_d64 *kernel, 167 mlib_s32 m, 168 mlib_s32 n, 169 mlib_s32 dx_l, 170 mlib_s32 dx_r, 171 mlib_s32 dy_t, 172 mlib_s32 dy_b, 173 mlib_s32 cmask); 174 175 mlib_status mlib_convMxNext_d64(mlib_image *dst, 176 const mlib_image *src, 177 const mlib_d64 *kernel, 178 mlib_s32 m, 179 mlib_s32 n, 180 mlib_s32 dx_l, 181 mlib_s32 dx_r, 182 mlib_s32 dy_t, 183 mlib_s32 dy_b, 184 mlib_s32 cmask); 185 186 #ifdef __cplusplus 187 } 188 #endif /* __cplusplus */ 189 #endif /* __MLIB_IMAGECONV_H */