/*
* 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_ImageZoom - image scaling with edge condition
*
* SYNOPSIS
* mlib_status mlib_ImageZoom(mlib_image *dst,
* const mlib_image *src,
* mlib_f32 zoomx,
* mlib_f32 zoomy,
* mlib_filter filter,
* mlib_edge edge)
*
* ARGUMENTS
* dst Pointer to destination image
* src Pointer to source image
* zoomx X zoom factor.
* zoomy Y zoom factor.
* filter Type of resampling filter.
* edge Type of edge condition.
*
* DESCRIPTION
* The center of the source image is mapped to the center of the
* destination image.
*
* The upper-left corner pixel of an image is located at (0.5, 0.5).
*
* The resampling filter can be one of the following:
* MLIB_NEAREST
* MLIB_BILINEAR
* MLIB_BICUBIC
* MLIB_BICUBIC2
*
* The edge condition can be one of the following:
* MLIB_EDGE_DST_NO_WRITE (default)
* MLIB_EDGE_DST_FILL_ZERO
* MLIB_EDGE_OP_NEAREST
* MLIB_EDGE_SRC_EXTEND
* MLIB_EDGE_SRC_PADDED
*/
#include <mlib_image.h>
#include <vis_proto.h>
/***************************************************************/
#define _MLIB_VIS_VER_
#include <mlib_ImageZoom.h>
/***************************************************************/
mlib_s32 j, \
/***************************************************************/
{
for (j = 0; j < height; j++) {
}
else {
vis_write_gsr(7);
x += dx;
}
x += dx7;
#pragma pipeloop(0)
x -= dx;
x -= dx;
x -= dx;
x -= dx;
x -= dx;
x -= dx;
x -= dx;
x += dx15;
}
x -= dx7;
x += dx;
}
}
y0 = y;
y += dy;
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
for (j = 0; j < height; j++) {
}
else {
vis_write_gsr(7);
cx = x >> MLIB_SHIFT;
x += dx;
dp += 3;
}
x += dx7;
#pragma pipeloop(0)
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x += dx15;
}
x -= dx7;
cx = x >> MLIB_SHIFT;
x += dx;
dp += 3;
}
}
y0 = y;
y += dy;
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
for (j = 0; j < height; j++) {
}
else {
vis_write_gsr(6);
cx = x >> MLIB_SHIFT;
x += dx;
dp += 3;
}
x += dx3;
#pragma pipeloop(0)
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x -= dx;
cx = x >> MLIB_SHIFT;
x += dx7;
}
x -= dx3;
cx = x >> MLIB_SHIFT;
x += dx;
dp += 3;
}
}
y0 = y;
y += dy;
}
return MLIB_SUCCESS;
}
/***************************************************************/
{
for (j = 0; j < height; j++) {
}
else {
vis_write_gsr(6);
x += dx;
}
x += dx3;
#pragma pipeloop(0)
x -= dx;
x -= dx;
x -= dx;
x += dx7;
}
x -= dx3;
x += dx;
}
}
y0 = y;
y += dy;
}
return MLIB_SUCCESS;
}
/***************************************************************/