|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Image Transforms subsystem. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CVTIMAGESCALERMACROS_H |
|
22 #define CVTIMAGESCALERMACROS_H |
|
23 |
|
24 // MACROS |
|
25 |
|
26 #define UNPACK_4K_RED( c ) ( 0xf & ( c >> 8 ) ) |
|
27 #define UNPACK_4K_GREEN( c ) ( 0xf & ( c >> 4 ) ) |
|
28 #define UNPACK_4K_BLUE( c ) ( 0xf & c ) |
|
29 #define PACK_4K_BGR( b, g, r ) \ |
|
30 TUint16( ( b ) | ( ( ( g ) | ( ( r ) << 4 ) ) << 4 ) ) |
|
31 |
|
32 #define UNPACK_64K_RED( c ) ( c >> 11 ) |
|
33 #define UNPACK_64K_GREEN( c ) ( 0x3f & ( c >> 5 ) ) |
|
34 #define UNPACK_64K_BLUE( c ) ( 0x1f & c ) |
|
35 #define PACK_64K_BGR( b, g, r ) \ |
|
36 TUint16( ( b ) | ( ( ( g ) | ( ( r ) << 6 ) ) << 5 ) ) |
|
37 |
|
38 #define UNPACK_16MU_RED( c ) ( 0xff & ( c >> 16 ) ) |
|
39 #define UNPACK_16MU_GREEN( c ) ( 0xff & ( c >> 8 ) ) |
|
40 #define UNPACK_16MU_BLUE( c ) ( c & 0xff ) |
|
41 #define PACK_16MU_BGR( b, g, r ) \ |
|
42 TUint32( ( ( ( ( ( 0xff << 8 ) | ( r ) ) << 8 ) | ( g ) ) << 8 ) | ( b ) ) |
|
43 |
|
44 #define UNPACK_16MA_ALPHA( c ) ( 0xff & ( c >> 24 ) ) |
|
45 #define UNPACK_16MA_RED( c ) ( 0xff & ( c >> 16 ) ) |
|
46 #define UNPACK_16MA_GREEN( c ) ( 0xff & ( c >> 8 ) ) |
|
47 #define UNPACK_16MA_BLUE( c ) ( c & 0xff ) |
|
48 #define PACK_16MA_ABGR( a, b, g, r ) \ |
|
49 TUint32( ( ( ( ( ( ( a ) << 8 ) | ( r ) ) << 8 ) | ( g ) ) << 8 ) | ( b ) ) |
|
50 |
|
51 #endif // CVTIMAGESCALERMACROS_H |
|
52 |
|
53 // End of File |
|
54 |
|
55 |