146 DEFINE_CONVERT_BLIT(IntArgb, ByteIndexed, 3ByteRgb)
147
148 DEFINE_CONVERT_BLIT(ThreeByteBgr, ByteIndexed, 3ByteRgb)
149
150 DEFINE_CONVERT_BLIT(ByteGray, ByteIndexed, 3ByteRgb)
151
152 DEFINE_CONVERT_BLIT(Index12Gray, ByteIndexed, 3ByteRgb)
153
154 void NAME_CONVERT_BLIT(ByteIndexed, ByteIndexed)
155 (void *srcBase, void *dstBase,
156 juint width, juint height,
157 SurfaceDataRasInfo *pSrcInfo,
158 SurfaceDataRasInfo *pDstInfo,
159 NativePrimitive *pPrim,
160 CompositeInfo *pCompInfo)
161 {
162 DeclareByteIndexedLoadVars(SrcRead)
163 DeclareByteIndexedLoadVars(DstRead)
164 jint srcScan = pSrcInfo->scanStride;
165 jint dstScan = pDstInfo->scanStride;
166
167 InitByteIndexedLoadVars(SrcRead, pSrcInfo);
168 InitByteIndexedLoadVars(DstRead, pDstInfo);
169
170 if (checkSameLut(SrcReadLut, DstReadLut, pSrcInfo, pDstInfo)) {
171 do {
172 memcpy(dstBase, srcBase, width);
173 srcBase = PtrAddBytes(srcBase, srcScan);
174 dstBase = PtrAddBytes(dstBase, dstScan);
175 } while (--height > 0);
176 } else {
177 DeclareByteIndexedStoreVars(DstWrite);
178
179 BlitLoopWidthHeight(ByteIndexed, pSrc, srcBase, pSrcInfo,
180 ByteIndexed, pDst, dstBase, pDstInfo, DstWrite,
181 width, height,
182 ConvertVia3ByteRgb
183 (pSrc, ByteIndexed, SrcRead,
184 pDst, ByteIndexed, DstWrite, 0, 0));
185 }
190 DEFINE_SCALE_BLIT(ThreeByteBgr, ByteIndexed, 3ByteRgb)
191
192 DEFINE_SCALE_BLIT(ByteGray, ByteIndexed, 3ByteRgb)
193
194 DEFINE_SCALE_BLIT(Index12Gray, ByteIndexed, 3ByteRgb)
195
196 void NAME_SCALE_BLIT(ByteIndexed, ByteIndexed)
197 (void *srcBase, void *dstBase,
198 juint width, juint height,
199 jint sxloc, jint syloc,
200 jint sxinc, jint syinc, jint shift,
201 SurfaceDataRasInfo *pSrcInfo,
202 SurfaceDataRasInfo *pDstInfo,
203 NativePrimitive *pPrim,
204 CompositeInfo *pCompInfo)
205 {
206 DeclareByteIndexedLoadVars(SrcRead)
207 DeclareByteIndexedLoadVars(DstRead)
208 jint srcScan = pSrcInfo->scanStride;
209 jint dstScan = pDstInfo->scanStride;
210 DeclareByteIndexedStoreVars(DstWrite)
211
212 InitByteIndexedLoadVars(SrcRead, pSrcInfo);
213 InitByteIndexedLoadVars(DstRead, pDstInfo);
214
215 if (checkSameLut(SrcReadLut, DstReadLut, pSrcInfo, pDstInfo)) {
216 BlitLoopScaleWidthHeight(ByteIndexed, pSrc, srcBase, pSrcInfo,
217 ByteIndexed, pDst, dstBase, pDstInfo, DstWrite,
218 x, width, height,
219 sxloc, syloc, sxinc, syinc, shift,
220 pDst[0] = pSrc[x]);
221 } else {
222 BlitLoopScaleWidthHeight(ByteIndexed, pSrc, srcBase, pSrcInfo,
223 ByteIndexed, pDst, dstBase, pDstInfo, DstWrite,
224 x, width, height,
225 sxloc, syloc, sxinc, syinc, shift,
226 ConvertVia3ByteRgb(pSrc, ByteIndexed, SrcRead,
227 pDst, ByteIndexed, DstWrite,
228 x, 0));
229 }
|
146 DEFINE_CONVERT_BLIT(IntArgb, ByteIndexed, 3ByteRgb)
147
148 DEFINE_CONVERT_BLIT(ThreeByteBgr, ByteIndexed, 3ByteRgb)
149
150 DEFINE_CONVERT_BLIT(ByteGray, ByteIndexed, 3ByteRgb)
151
152 DEFINE_CONVERT_BLIT(Index12Gray, ByteIndexed, 3ByteRgb)
153
154 void NAME_CONVERT_BLIT(ByteIndexed, ByteIndexed)
155 (void *srcBase, void *dstBase,
156 juint width, juint height,
157 SurfaceDataRasInfo *pSrcInfo,
158 SurfaceDataRasInfo *pDstInfo,
159 NativePrimitive *pPrim,
160 CompositeInfo *pCompInfo)
161 {
162 DeclareByteIndexedLoadVars(SrcRead)
163 DeclareByteIndexedLoadVars(DstRead)
164 jint srcScan = pSrcInfo->scanStride;
165 jint dstScan = pDstInfo->scanStride;
166 jboolean representsPrimary = (pDstInfo)->representsPrimary;
167
168 InitByteIndexedLoadVars(SrcRead, pSrcInfo);
169 InitByteIndexedLoadVars(DstRead, pDstInfo);
170
171 if (checkSameLut(SrcReadLut, DstReadLut, pSrcInfo, pDstInfo)) {
172 do {
173 memcpy(dstBase, srcBase, width);
174 srcBase = PtrAddBytes(srcBase, srcScan);
175 dstBase = PtrAddBytes(dstBase, dstScan);
176 } while (--height > 0);
177 } else {
178 DeclareByteIndexedStoreVars(DstWrite);
179
180 BlitLoopWidthHeight(ByteIndexed, pSrc, srcBase, pSrcInfo,
181 ByteIndexed, pDst, dstBase, pDstInfo, DstWrite,
182 width, height,
183 ConvertVia3ByteRgb
184 (pSrc, ByteIndexed, SrcRead,
185 pDst, ByteIndexed, DstWrite, 0, 0));
186 }
191 DEFINE_SCALE_BLIT(ThreeByteBgr, ByteIndexed, 3ByteRgb)
192
193 DEFINE_SCALE_BLIT(ByteGray, ByteIndexed, 3ByteRgb)
194
195 DEFINE_SCALE_BLIT(Index12Gray, ByteIndexed, 3ByteRgb)
196
197 void NAME_SCALE_BLIT(ByteIndexed, ByteIndexed)
198 (void *srcBase, void *dstBase,
199 juint width, juint height,
200 jint sxloc, jint syloc,
201 jint sxinc, jint syinc, jint shift,
202 SurfaceDataRasInfo *pSrcInfo,
203 SurfaceDataRasInfo *pDstInfo,
204 NativePrimitive *pPrim,
205 CompositeInfo *pCompInfo)
206 {
207 DeclareByteIndexedLoadVars(SrcRead)
208 DeclareByteIndexedLoadVars(DstRead)
209 jint srcScan = pSrcInfo->scanStride;
210 jint dstScan = pDstInfo->scanStride;
211 jboolean representsPrimary = (pDstInfo)->representsPrimary;
212 DeclareByteIndexedStoreVars(DstWrite)
213
214 InitByteIndexedLoadVars(SrcRead, pSrcInfo);
215 InitByteIndexedLoadVars(DstRead, pDstInfo);
216
217 if (checkSameLut(SrcReadLut, DstReadLut, pSrcInfo, pDstInfo)) {
218 BlitLoopScaleWidthHeight(ByteIndexed, pSrc, srcBase, pSrcInfo,
219 ByteIndexed, pDst, dstBase, pDstInfo, DstWrite,
220 x, width, height,
221 sxloc, syloc, sxinc, syinc, shift,
222 pDst[0] = pSrc[x]);
223 } else {
224 BlitLoopScaleWidthHeight(ByteIndexed, pSrc, srcBase, pSrcInfo,
225 ByteIndexed, pDst, dstBase, pDstInfo, DstWrite,
226 x, width, height,
227 sxloc, syloc, sxinc, syinc, shift,
228 ConvertVia3ByteRgb(pSrc, ByteIndexed, SrcRead,
229 pDst, ByteIndexed, DstWrite,
230 x, 0));
231 }
|