/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* FUNCTION
* MLIB_EDGE_DST_NO_WRITE mask
*
*/
#include "mlib_image.h"
#include "mlib_ImageConv.h"
/***************************************************************/
/*
This define switches between functions of MLIB_DOUBLE and MLIB_FLOAT types:
Files mlib_ImageConv_D64nw.c and mlib_ImageConv_F32nw.c
*/
#define TYPE_DOUBLE
/***************************************************************/
#ifdef TYPE_DOUBLE
#else
#endif /* TYPE_DOUBLE */
/***************************************************************/
/***************************************************************/
mlib_s32 i = 0, j, c
/***************************************************************/
{
/* keep kernel in regs */
for (c = 0; c < chan1; c++) {
for (j = 0; j < hgt; j++) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (i < wid) {
if ((i + 1) < wid) {
if ((i + 2) < wid) {
}
}
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
/* keep kernel in regs */
for (c = 0; c < chan1; c++) {
for (j = 0; j < hgt; j++) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (wid & 1) {
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
const mlib_d64 *k,
{
for (c = 0; c < chan1; c++) {
for (j = 0; j < hgt; j++) {
/*
* First loop on two first lines of kernel
*/
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (wid & 1) {
}
/*
* Second loop on two last lines of kernel
*/
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (wid & 1) {
}
/* next line */
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
const mlib_d64 *k,
{
for (c = 0; c < chan1; c++) {
for (j = 0; j < hgt; j++) {
/*
* First loop
*/
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (wid & 1) {
}
/*
* Second loop
*/
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (wid & 1) {
}
/*
* 3 loop
*/
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
if (wid & 1) {
}
/* next line */
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
const mlib_image *src,
const DTYPE *k,
mlib_s32 n,
{
hgt -= (n - 1);
}
for (c = 0; c < chan1; c++) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < wid; i++) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (j = 0; j < hsize; j += 2) {
}
}
if (kh == 4) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
pbuff[j] = 0;
pbuff[j + 1] = 0;
}
if (j < hsize) {
pbuff[j] = 0;
}
} else if (kh == 3) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
pbuff[j] = 0;
pbuff[j + 1] = 0;
}
if (j < hsize) {
pbuff[j] = 0;
}
} else if (kh == 2) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
pbuff[j] = 0;
pbuff[j + 1] = 0;
}
if (j < hsize) {
pbuff[j] = 0;
}
} else /* if (kh == 1) */ {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (j = 0; j < hsize; j++) {
pbuff[j] = 0;
}
}
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
const mlib_image *src,
mlib_s32 m,
mlib_s32 n,
{
#ifdef TYPE_DOUBLE
#else
if (n*m > MAX_NM) {
k = mlib_malloc(n*m*sizeof(mlib_f32));
if (k == NULL) return MLIB_FAILURE;
}
#endif /* TYPE_DOUBLE */
wid -= (m - 1);
hgt -= (n - 1);
for (c = 0; c < chan1; c++) {
for (j = 0; j < hgt; j++) {
for (l = 0; l < n; l++) {
if (kw == 7) {
if (pk == k) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
} else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
}
} else if (kw == 6) {
if (pk == k) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
} else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
}
} else if (kw == 5) {
if (pk == k) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
} else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
}
} else if (kw == 4) {
if (pk == k) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
} else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
}
} else if (kw == 3) {
if (pk == k) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
} else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
}
} else { /* kw == 2 */
if (pk == k) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
} else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
}
}
}
}
}
/* last pixels */
if (wid & 1) {
mlib_s32 x;
for (l = 0; l < n; l++) {
}
dp[0] = s;
}
/* next line */
}
}
#ifndef TYPE_DOUBLE
#endif /* TYPE_DOUBLE */
return MLIB_SUCCESS;
}
/***************************************************************/