/*
* 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
* Image affine transformation with Bicubic filtering
* SYNOPSIS
* mlib_status mlib_ImageAffine_[s32|f32|d64]_?ch_bc(mlib_s32 *leftEdges,
* mlib_s32 *rightEdges,
* mlib_s32 *xStarts,
* mlib_s32 *yStarts,
* mlib_s32 *sides,
* mlib_u8 *dstData,
* mlib_u8 **lineAddr,
* mlib_s32 dstYStride,
* mlib_s32 is_affine,
* mlib_s32 srcYStride,
* mlib_filter filter)
*
*
* ARGUMENTS
* leftEdges array[dstHeight] of xLeft coordinates
* RightEdges array[dstHeight] of xRight coordinates
* xStarts array[dstHeight] of xStart * 65536 coordinates
* yStarts array[dstHeight] of yStart * 65536 coordinates
* sides output array[4]. sides[0] is yStart, sides[1] is yFinish,
* sides[2] is dx * 65536, sides[3] is dy * 65536
* dstData pointer to the first pixel on (yStart - 1) line
* lineAddr array[srcHeight] of pointers to the first pixel on
* the corresponding lines
* dstYStride stride of destination image
* is_affine indicator (Affine - GridWarp)
* srcYStride stride of source image
* filter type of resampling filter
*
* DESCRIPTION
* The functions step along the lines from xLeft to xRight and apply
* the Bicubic and Bicubic2 filtering.
*
*/
#include "mlib_ImageAffine.h"
/***************************************************************/
#if IMG_TYPE == 3
#endif /* IMG_TYPE == 3 */
/***************************************************************/
\
\
OPERATOR; \
\
/***************************************************************/
\
\
OPERATOR; \
\
/***************************************************************/
{
CLIP(1);
if (filter == MLIB_BICUBIC) {
CREATE_COEF_BICUBIC(X, Y,;);
}
else {
CREATE_COEF_BICUBIC_2(X, Y,;);
}
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
if (filter == MLIB_BICUBIC) {
X += dX;
Y += dY;
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
else {
X += dX;
Y += dY;
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
mlib_s32 k;
CLIP(2);
for (k = 0; k < 2; k++) {
if (filter == MLIB_BICUBIC) {
}
else {
}
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
if (filter == MLIB_BICUBIC) {
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
else {
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
mlib_s32 k;
CLIP(3);
for (k = 0; k < 3; k++) {
if (filter == MLIB_BICUBIC) {
}
else {
}
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
if (filter == MLIB_BICUBIC) {
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
else {
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
mlib_s32 k;
CLIP(4);
for (k = 0; k < 4; k++) {
if (filter == MLIB_BICUBIC) {
}
else {
}
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
if (filter == MLIB_BICUBIC) {
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
else {
s0 = srcPixelPtr[0];
s4 = srcPixelPtr[0];
}
}
}
}
return MLIB_SUCCESS;
}
/***************************************************************/