/*
* 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_ImageConvMxN_Fp - image convolution with edge condition
*
* SYNOPSIS
* mlib_status mlib_ImageConvMxN_Fp(mlib_image *dst,
* const mlib_image *src,
* const mlib_d64 *kernel,
* mlib_s32 m,
* mlib_s32 n,
* mlib_s32 dm,
* mlib_s32 dn,
* mlib_s32 cmask,
* mlib_edge edge)
*
* ARGUMENTS
* dst Pointer to destination image.
* src Pointer to source image.
* m Kernel width (m must be not less than 1).
* n Kernel height (n must be not less than 1).
* dm, dn Position of key element in convolution kernel.
* kernel Pointer to convolution kernel.
* cmask Channel mask to indicate the channels to be convolved.
* Each bit of which represents a channel in the image. The
* channels corresponded to 1 bits are those to be processed.
* edge Type of edge condition.
*
* DESCRIPTION
* 2-D convolution, MxN kernel.
*
* The center of the source image is mapped to the center of the
* destination image.
* The unselected channels are not overwritten. If both src and dst have
* just one channel, cmask is ignored.
*
* The edge condition can be one of the following:
* MLIB_EDGE_DST_NO_WRITE (default)
* MLIB_EDGE_DST_FILL_ZERO
* MLIB_EDGE_DST_COPY_SRC
* MLIB_EDGE_SRC_EXTEND
*
* RESTRICTION
* The src and the dst must be the same type and have same number
* of channels (1, 2, 3, or 4).
* m >= 1, n >= 1,
* 0 <= dm < m, 0 <= dn < n.
*/
#include "mlib_image.h"
#include "mlib_ImageCheck.h"
#include "mlib_SysMath.h"
#include "mlib_ImageConv.h"
/***************************************************************/
mlib_s32 n,
mlib_s32 m,
mlib_s32 n,
mlib_s32 n,
mlib_s32 m,
mlib_s32 n,
/***************************************************************/
#if 0
mlib_s32 n,
mlib_s32 m,
mlib_s32 n,
mlib_s32 m,
#endif /* 0 */
/***************************************************************/
const mlib_image *src,
mlib_s32 m,
mlib_s32 n,
{
return MLIB_FAILURE;
}
/***************************************************************/
mlib_s32 n,
mlib_s32 m,
{
mlib_s32 i, j;
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
if (j < m - 1) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
else if (j < m) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
}
/***************************************************************/
mlib_s32 n,
{
mlib_s32 i;
for (i = 0; i < dx_l; i++)
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (; i < n - dx_r; i++)
for (; i < n; i++)
}
/***************************************************************/
const mlib_image *src,
mlib_s32 m,
mlib_s32 n,
{
return MLIB_FAILURE;
}
for (k = 0; k < nch; k++)
for (i = 0; i < dw; i++)
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
#if 0
mlib_s32 n,
mlib_s32 m,
{
mlib_s32 i, j;
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
if (j < m - 1) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
else if (j < m) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
}
/***************************************************************/
mlib_s32 n,
mlib_s32 m,
{
mlib_s32 i, j;
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
if (j < m - 1) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
else if (j < m) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
}
#endif /* 0 */
/***************************************************************/
mlib_s32 n,
mlib_s32 m,
{
mlib_s32 i, j;
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
if (j < m - 1) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
else if (j < m) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < n; i++) {
}
}
}
/***************************************************************/
mlib_s32 n,
{
mlib_s32 i;
for (i = 0; i < dx_l; i++)
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (; i < n - dx_r; i++)
for (; i < n; i++)
}
/***************************************************************/
const mlib_image *src,
mlib_s32 m,
mlib_s32 n,
{
return MLIB_FAILURE;
}
for (k = 0; k < nch; k++)
for (i = 0; i < dw; i++)
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/