1/* 2 * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26#ifndef ByteBinary4Bit_h_Included 27#define ByteBinary4Bit_h_Included 28 29#include "AnyByteBinary.h" 30 31/* 32 * This file contains macro and type definitions used by the macros in 33 * LoopMacros.h to manipulate a surface of type "ByteBinary4Bit". 34 */ 35 36typedef jubyte ByteBinary4BitPixelType; 37typedef jubyte ByteBinary4BitDataType; 38 39#define ByteBinary4BitPixelStride 0 40#define ByteBinary4BitPixelsPerByte 2 41#define ByteBinary4BitBitsPerPixel 4 42#define ByteBinary4BitMaxBitOffset 4 43#define ByteBinary4BitPixelMask 0xf 44 45#define DeclareByteBinary4BitLoadVars DeclareByteBinaryLoadVars 46#define DeclareByteBinary4BitStoreVars DeclareByteBinaryStoreVars 47#define SetByteBinary4BitStoreVarsYPos SetByteBinaryStoreVarsYPos 48#define SetByteBinary4BitStoreVarsXPos SetByteBinaryStoreVarsXPos 49#define InitByteBinary4BitLoadVars InitByteBinaryLoadVars 50#define InitByteBinary4BitStoreVarsY InitByteBinaryStoreVarsY 51#define InitByteBinary4BitStoreVarsX InitByteBinaryStoreVarsX 52#define NextByteBinary4BitStoreVarsY NextByteBinaryStoreVarsY 53#define NextByteBinary4BitStoreVarsX NextByteBinaryStoreVarsX 54 55#define DeclareByteBinary4BitInitialLoadVars(pRasInfo, pRas, PREFIX, x) \ 56 DeclareByteBinaryInitialLoadVars(ByteBinary4Bit, pRasInfo, pRas, PREFIX, x) 57 58#define InitialLoadByteBinary4Bit(pRas, PREFIX) \ 59 InitialLoadByteBinary(ByteBinary4Bit, pRas, PREFIX) 60 61#define ShiftBitsByteBinary4Bit(PREFIX) \ 62 ShiftBitsByteBinary(ByteBinary4Bit, PREFIX) 63 64#define FinalStoreByteBinary4Bit(pRas, PREFIX) \ 65 FinalStoreByteBinary(ByteBinary4Bit, pRas, PREFIX) 66 67#define CurrentPixelByteBinary4Bit(PREFIX) \ 68 CurrentPixelByteBinary(ByteBinary4Bit, PREFIX) 69 70 71#define StoreByteBinary4BitPixel(pRas, x, pixel) \ 72 StoreByteBinaryPixel(ByteBinary4Bit, pRas, x, pixel) 73 74#define StoreByteBinary4BitPixelData(pPix, x, pixel, PREFIX) \ 75 StoreByteBinaryPixelData(ByteBinary4Bit, pPix, x, pixel, PREFIX) 76 77#define ByteBinary4BitPixelFromArgb(pixel, rgb, pRasInfo) \ 78 ByteBinaryPixelFromArgb(ByteBinary4Bit, pixel, rgb, pRasInfo) 79 80#define XorByteBinary4BitPixelData(pDst, x, PREFIX, srcpixel, xorpixel, mask)\ 81 XorByteBinaryPixelData(ByteBinary4Bit, pDst, x, PREFIX, \ 82 srcpixel, xorpixel, mask) 83 84 85#define LoadByteBinary4BitTo1IntRgb(pRas, PREFIX, x, rgb) \ 86 LoadByteBinaryTo1IntRgb(ByteBinary4Bit, pRas, PREFIX, x, rgb) 87 88#define LoadByteBinary4BitTo1IntArgb(pRas, PREFIX, x, argb) \ 89 LoadByteBinaryTo1IntArgb(ByteBinary4Bit, pRas, PREFIX, x, argb) 90 91#define LoadByteBinary4BitTo3ByteRgb(pRas, PREFIX, x, r, g, b) \ 92 LoadByteBinaryTo3ByteRgb(ByteBinary4Bit, pRas, PREFIX, x, r, g, b) 93 94#define LoadByteBinary4BitTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \ 95 LoadByteBinaryTo4ByteArgb(ByteBinary4Bit, pRas, PREFIX, x, a, r, g, b) 96 97#define StoreByteBinary4BitFrom1IntRgb(pRas, PREFIX, x, rgb) \ 98 StoreByteBinaryFrom1IntRgb(ByteBinary4Bit, pRas, PREFIX, x, rgb) 99 100#define StoreByteBinary4BitFrom1IntArgb(pRas, PREFIX, x, argb) \ 101 StoreByteBinaryFrom1IntArgb(ByteBinary4Bit, pRas, PREFIX, x, argb) 102 103#define StoreByteBinary4BitFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \ 104 StoreByteBinaryFrom3ByteRgb(ByteBinary4Bit, pRas, PREFIX, x, r, g, b) 105 106#define StoreByteBinary4BitFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \ 107 StoreByteBinaryFrom4ByteArgb(ByteBinary4Bit, pRas, PREFIX, x, a, r, g, b) 108 109 110#define DeclareByteBinary4BitAlphaLoadData(PREFIX) \ 111 DeclareByteBinaryAlphaLoadData(ByteBinary4Bit, PREFIX) 112 113#define InitByteBinary4BitAlphaLoadData(PREFIX, pRasInfo) \ 114 InitByteBinaryAlphaLoadData(ByteBinary4Bit, PREFIX, pRasInfo) 115 116#define LoadAlphaFromByteBinary4BitFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \ 117 LoadAlphaFromByteBinaryFor4ByteArgb(ByteBinary4Bit, pRas, PREFIX, \ 118 COMP_PREFIX) 119 120#define Postload4ByteArgbFromByteBinary4Bit(pRas, PREFIX, COMP_PREFIX) \ 121 Postload4ByteArgbFromByteBinary(ByteBinary4Bit, pRas, PREFIX, COMP_PREFIX) 122 123 124#define ByteBinary4BitIsPremultiplied ByteBinaryIsPremultiplied 125 126#define StoreByteBinary4BitFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \ 127 StoreByteBinaryFrom4ByteArgbComps(ByteBinary4Bit, pRas, \ 128 PREFIX, x, COMP_PREFIX) 129 130#endif /* ByteBinary4Bit_h_Included */ 131