/*
* 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.
*/
/*
* DESCRIPTION
* Calculates cliping boundary for Affine functions.
*
*/
#include "mlib_image.h"
#include "mlib_SysMath.h"
#include "mlib_ImageAffine.h"
/***************************************************************/
const mlib_image *dst,
const mlib_image *src,
void *buff_lcl,
{
mlib_s32 i, j, t;
return MLIB_FAILURE;
}
div = a * d - b * c;
if (div == 0.0) {
return MLIB_FAILURE;
}
}
return MLIB_FAILURE;
}
for (i = 0; i < 2 * kh; i++)
lineAddr[i] = srcLinePtr;
for (i = 0; i < srcHeight - 1; i++) {
lineAddr[i] = srcLinePtr;
srcLinePtr += srcYStride;
}
lineAddr[i] = srcLinePtr;
}
minX = 0;
minY = 0;
}
else {
if (kw > 1)
if (edge == MLIB_EDGE_SRC_PADDED) {
}
}
/*
* STORE_PARAM(param, src);
* STORE_PARAM(param, dst);
*/
return MLIB_SUCCESS;
}
a2 = d;
b2 = -b;
c2 = -c;
d2 = a;
tx -= 0.5;
ty -= 0.5;
if (div > 0) {
}
else {
}
topIdx = 0;
for (i = 1; i < 4; i++) {
topIdx = i;
}
bot = -1;
return MLIB_SUCCESS;
}
if (dTop >= 0.0) {
}
}
SAT32(t);
if (xLeft >= MLIB_S32_MAX)
}
else
top++;
}
else
top = 0;
for (i = 0; i < 2; i++) {
continue;
if (dY1 < 0.0)
y1 = 0;
else {
}
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
val0 = x;
SAT32(t);
leftEdges[j] = (t >= x) ? t : ++t;
if (x >= MLIB_S32_MAX)
leftEdges[j] = MLIB_S32_MAX;
x += slope;
}
}
for (i = 0; i < 2; i++) {
continue;
if (dY1 < 0.0)
y1 = 0;
else {
}
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
val0 = x;
SAT32(rightEdges[j]);
x += slope;
}
}
{
/*
* mlib_s32 xCl = (mlib_s32)(xClip + delta);
* mlib_s32 yCl = (mlib_s32)(yClip + delta);
* mlib_s32 wCl = (mlib_s32)(wClip);
* mlib_s32 hCl = (mlib_s32)(hClip);
*/
if (edge == MLIB_EDGE_SRC_PADDED) {
}
if (div > 0) {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
ii = i + 0.5;
xLeft++;
xRight = -1;
}
xRight--;
xRight = -1;
}
if (sdx > 0)
sdx -= 1;
else
sdx += 1;
}
if (sdy > 0)
sdy -= 1;
else
sdy += 1;
}
}
rightEdges[i] = xRight;
}
}
else {
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
ii = i + 0.5;
xLeft++;
xRight = -1;
}
xRight--;
xRight = -1;
}
if (sdx > 0)
sdx -= 1;
else
sdx += 1;
}
if (sdy > 0)
sdy -= 1;
else
sdy += 1;
}
}
rightEdges[i] = xRight;
}
}
}
top++;
bot--;
return MLIB_SUCCESS;
}
/***************************************************************/