/*
* 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.
*/
#ifndef __MLIB_V_IMAGECONSTLOGIC_H
#define __MLIB_V_IMAGECONSTLOGIC_H
#if defined ( VIS )
#if VIS >= 0x200
#endif /* VIS >= 0x200 */
#endif /* defined ( VIS ) */
#include <mlib_image.h>
#include <vis_proto.h>
#include <mlib_ImageCheck.h>
#include <mlib_ImageLogic_proto.h>
#include <mlib_v_ImageLogic_proto.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* Macro definitions for VIS version image logical functions.
*/
/***************************************************************/
#define VALIDATE() \
\
\
\
if (type == MLIB_SHORT) { \
if (nchannels == 1) { \
} else if (nchannels == 2) { \
} else if (nchannels == 3) { \
} else { \
} \
\
if (nchannels == 1) { \
} else if (nchannels == 2) { \
} else if (nchannels == 3) { \
(c[2] & 0xFF); \
} else { \
((c[2] & 0xFF) << 8) | (c[3] & 0xFF); \
} \
} else { \
if (nchannels == 1) { \
c01 = c[0] & 0xFFFFFFFF; \
} else if (nchannels == 2) { \
} else if (nchannels == 3) { \
} else { \
} \
} \
\
return MLIB_FAILURE
/***************************************************************/
mlib_s32 *c)
{
mlib_s32 i, j;
VALIDATE();
if (nchannels == 3) {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
}
#pragma pipeloop(0)
dpp += 3;
spp += 3;
}
if (i < amount) {
i += 8;
}
if (i < amount) {
i += 8;
}
if (i < amount) {
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
spp++;
}
#pragma pipeloop(0)
dpp += 3;
spp += 3;
}
if (i < amount) {
i += 8;
spp++;
}
if (i < amount) {
i += 8;
spp++;
}
if (i < amount) {
}
}
}
else {
for (j = 0; j < height; j++) {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
}
#pragma pipeloop(0)
dpp += 3;
spp += 3;
}
if (i < amount) {
i += 8;
}
if (i < amount) {
i += 8;
}
if (i < amount) {
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
spp++;
}
#pragma pipeloop(0)
dpp += 3;
spp += 3;
}
if (i < amount) {
i += 8;
spp++;
}
if (i < amount) {
i += 8;
spp++;
}
if (i < amount) {
}
}
}
}
}
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
}
#pragma pipeloop(0)
spp++;
}
if (i < amount) {
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
spp++;
}
#pragma pipeloop(0)
spp++;
}
if (i < amount) {
}
}
}
else {
for (j = 0; j < height; j++) {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
}
#pragma pipeloop(0)
spp++;
}
if (i < amount) {
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
spp++;
}
#pragma pipeloop(0)
spp++;
}
if (i < amount) {
}
}
}
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
}
#pragma pipeloop(0)
dpp += 2;
spp += 2;
}
if (i < amount) {
i += 8;
}
if (i < amount) {
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
spp++;
}
#pragma pipeloop(0)
dpp += 2;
spp += 2;
}
if (i < amount) {
i += 8;
spp++;
}
if (i < amount) {
}
}
}
else {
for (j = 0; j < height; j++) {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
}
#pragma pipeloop(0)
dpp += 2;
spp += 2;
}
if (i < amount) {
i += 8;
}
if (i < amount) {
}
}
else {
/* prepare the destination addresses */
if (i != 0) {
}
else {
}
/* prepare the destination addresses */
if (i != 0) {
/* generate edge mask for the start point */
i += 8;
spp++;
}
#pragma pipeloop(0)
dpp += 2;
spp += 2;
}
if (i < amount) {
i += 8;
spp++;
}
if (i < amount) {
}
}
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __MLIB_V_IMAGECONSTLOGIC_H */