/****************************************************************************** * (c)2008-2009 Broadcom Corporation * * This program is the proprietary software of Broadcom Corporation and/or its licensors, * and may only be used, duplicated, modified or distributed pursuant to the terms and * conditions of a separate, written license agreement executed between you and Broadcom * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants * no license (express or implied), right to use, or waiver of any kind with respect to the * Software, and Broadcom expressly reserves all rights in and to the Software and all * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. * * Except as expressly set forth in the Authorized License, * * 1. This program, including its structure, sequence and organization, constitutes the valuable trade * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, * and to use this information only in connection with your use of Broadcom integrated circuit products. * * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF * USE OR PERFORMANCE OF THE SOFTWARE. * * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF * ANY LIMITED REMEDY. * * $brcm_Workfile: $ * $brcm_Revision: $ * $brcm_Date: $ * * Module Description: * * The application uses a palette (CLUT - color lookup table) graphics format. * * Revision History: * * Created: 09/28/2009 by Jeff Fisher * * $brcm_Log: $ * * *****************************************************************************/ #include "bapp_palette.h" static const unsigned int g_palette[] = { 0x00000000,0xFF101010,0xA5101010,0xFFb4b4b4, 0xFF000033,0xFF000044,0xFF000022,0xFFc0a601, 0xFFc3b306,0xFFddbe11,0xFFC6AA21,0xFFF2EBC1, 0xFF0FE355,0xF0FFFF00,0xF000FFFF,0xF0FFFFFF }; const unsigned int g_yuv_palette[] = { 0x00108080, 0xff1d8080, 0xa51d8080, 0xffaa8080, 0xff14967c, 0xff169d7b, 0xff138e7d, 0xff953397, 0xff9c3193, 0xffaa2f99, 0xff9b3f96, 0xffd76c86, 0xff8e612d, 0xf0d21092, 0xf0a9a510, 0xf0eb8080, }; /* more subtle colors */ const unsigned int g_eia708_palette[] = { 0x00108080, 0xff108080, 0xff7d8080, 0xff306db7, 0xff505b51, 0xff1cb776, 0xff704889, 0xff3da4ae, 0xff5c9248, 0x5f108080, 0x5f7d8080, 0x5f306db7, 0x5f505b51, 0x5f1cb776, 0x5f704889, 0x5f3da4ae, }; /* more subtle colors */ const unsigned int g_logo_palette[] = { #if 0 /* test technicolor logo */ 0x0080801d, 0xff827f8b, 0xffb27055, 0xff9d7775, 0xff837f56, 0xffc16981, 0xffc9686b, 0xffb76e92, 0xff8081c2, 0xffac73a5, 0xff967843, 0xff817f70, 0xff8180a7, 0xff8f7db4, 0xff7f80e2, 0xff000000, #else 0xff54999f, 0xff6081bd, 0xff55a86b, 0xff755acb, 0xff6f817f, 0xff627243, 0xff6db43b, 0xffa57f9d, 0xff99a550, 0xff9e506e, 0xffaa8173, 0xffa57960, 0xffb42aa7, 0xffc12690, 0xffcd578b, 0xffc12690, 0x00e97f7e #endif }; static const unsigned int g_palette_size = 16; bapp_result_t bapp_palette_get(bapp_palette_type_t etype, /* Palette type */ unsigned int *p_palette[], /* ARGB palette entries */ unsigned int *p_size /* Number of palette entries */ ) { switch (etype) { case ePALETTE_LOGO: *p_palette = (unsigned int *)g_logo_palette; *p_size = g_palette_size; break; case ePALETTE_EIA_708: *p_palette = (unsigned int *)g_eia708_palette; *p_size = g_palette_size; break; case ePALETTE_APP: default: *p_palette = (unsigned int *)g_yuv_palette; *p_size = g_palette_size; break; } return eBAPP_RESULT_OK; }