/*
* 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.
*/
/*
* FUNCTIONS
* mlib_v_ImageCopy_a1 - 1-D, Aligned8, size 8x
* mlib_v_ImageCopy_a2 - 2-D, Aligned8, width 8x
* mlib_ImageCopy_na - BYTE, non-aligned
* mlib_ImageCopy_bit_al - BIT, aligned
*
* SYNOPSIS
*
* ARGUMENT
* sp pointer to source image data
* dp pointer to destination image data
* size size in 8-bytes, bytes, or SHORTs
* width image width in 8-bytes
* height image height in lines
* stride source image line stride in 8-bytes
* dstride destination image line stride in 8-bytes
* s_offset source image line bit offset
* d_offset destination image line bit offset
*
* DESCRIPTION
* Direct copy from one image to another -- VIS version low level
* functions.
*
* NOTE
* These functions are separated from mlib_v_ImageCopy.c for loop
* unrolling and structure clarity.
*/
#include "vis_proto.h"
#include "mlib_image.h"
#include "mlib_ImageCopy.h"
#include "mlib_v_ImageCopy_f.h"
/***************************************************************/
/*
* Both source and destination image data are 1-d vectors and
* 8-byte aligned. And size is in 8-bytes.
*/
{
mlib_s32 i;
#pragma pipeloop(0)
for (i = 0; i < size; i++) {
}
}
/***************************************************************/
/*
* Either source or destination image data are not 1-d vectors, but
* they are 8-byte aligned. And stride and width are in 8-bytes.
*/
{
mlib_s32 i, j; /* indices for x, y */
/* row loop */
for (j = 0; j < height; j++) {
/* 8-byte column loop */
#pragma pipeloop(0)
for (i = 0; i < width; i++) {
}
}
}
/***************************************************************/
/*
* Both bit offsets of source and distination are the same
*/
{
mlib_s32 j; /* offset of address in dst */
if (size <- 0) return;
return;
}
da++;
sa++;
/* prepare the destination addresses */
/* prepare the source address */
/* generate edge mask for the start point */
if (emask != 0xff) {
sp++;
j += 8;
}
#pragma pipeloop(0)
sp++;
}
if (j < b_size) {
}
j = size & 7;
if (j > 0) {
}
}
/***************************************************************/
/*
* Either source or destination data are not 8-byte aligned.
* And size is is in bytes.
*/
{
mlib_s32 j; /* offset of address in dst */
/* prepare the destination addresses */
/* prepare the source address */
/* generate edge mask for the start point */
if (emask != 0xff) {
sp++;
j += 8;
}
#pragma pipeloop(0)
sp++;
}
if (j < size) {
}
}
else {
#pragma pipeloop(0)
}
if (j < size) {
}
}
}
/***************************************************************/