williamr@2: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __LOOKUPTABLE_H__ williamr@2: #define __LOOKUPTABLE_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: /** williamr@2: @internalTechnology williamr@2: */ williamr@2: IMPORT_C const TUint16* Convert16to32bppLow(); williamr@2: IMPORT_C const TUint32* Convert16to32bppHigh(); williamr@2: williamr@2: /** williamr@2: Returns the pointer to the table of 16-bit normalisation table. williamr@2: The table is currently used for performing un-multiplying Premultiplied Alpha color channels. williamr@2: Use: Let x be c * a/255, and y = c, then y = (x/a)*255, where a is in 0-255 range. williamr@2: To use this table, use y = (x * Table[a])>>8. i.e, the inaccurate division is converted williamr@2: to more accurate multiplication and shift. williamr@2: williamr@2: @return pointer to the normalisation table. williamr@2: @internalTechnology williamr@2: williamr@2: */ williamr@2: IMPORT_C const TUint16* PtrTo16BitNormalisationTable(); williamr@2: williamr@2: williamr@2: williamr@2: #endif