Logo.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:4k
源码类别:

DVD

开发平台:

Others

  1. /****************************************************************************************
  2.  *  Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
  3.  *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.  *
  5.  *  File: $Workfile: Logo.c $             
  6.  *
  7.  * Description:
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 6 $
  14.  * Last Modified by $Author: Leslie $ at $Modtime: 11/15/03 10:37a $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /I76/I76_Common/I76_Reference/Logo/Logo.c $
  19.  * 
  20.  * 6     11/15/03 7:07p Leslie
  21.  * Replace old  Video API Low Level Files with new ones
  22.  * 
  23.  * 5     9/29/03 11:52a Chaol
  24.  * code clear
  25.  * 
  26.  * 4     03-06-30 16:58 Leslie
  27.  * Merge for Alco Step A code
  28.  * 
  29.  * 3     03-06-17 18:27 Admin
  30.  * Merge for ExinoII project
  31.  * 
  32.  * 2     03-01-09 4:38 Leslie
  33.  * Support SUPPORT_TWO_LOGOS
  34.  * 
  35.  * 10    7/05/02 21:19 Nirm
  36.  * - Background-Color changes take effect immediately.
  37.  * 
  38.  * 9     23/04/02 9:27 Nirm
  39.  * - Added dependency in "Config.h".
  40.  * 
  41.  * 8     10/04/02 11:47 Ettim
  42.  * Added the method Logo_getCurrentSource()
  43.  * 
  44.  * 7     27/03/02 13:27 Nirm
  45.  * - Fixed a bug in Logo_getBackgroundColor().
  46.  * 
  47.  * 6     24/03/02 12:08 Nirm
  48.  * Added Logo_getBackgroundColor().
  49.  * 
  50.  * 5     17/03/02 9:48 Atai
  51.  * Convert I44 to DEC
  52.  * 
  53.  * 4     3/05/02 5:53a Dingming
  54.  * support frame display switch
  55.  * 
  56.  * 3     4/03/02 17:36 Atai
  57.  * rename I44 to DEC_LL
  58.  * 
  59.  * 2     2/18/02 14:58 Rinata
  60.  * prepare low level directory
  61.  * 
  62.  * 1     31/01/02 16:23 Nirm
  63.  ****************************************************************************************/
  64. /////////////////////////////////////////////////////////////////////////////
  65. // Logo.c - Logo/Background management
  66. //
  67. // Author: Nir Milstein
  68. #include "Config.h" // Global Configuration - do not remove!
  69. #include "DecoderDecoder.h"
  70. #include "Decoderlow_levelDEC_LL_Api.h"
  71. #include "LogoLogo.h"
  72. /////////////////////////////////////////////////////////////////////////////
  73. // Constants
  74. #define BLACK_Y 0x10
  75. #define BLACK_U 0x80
  76. #define BLACK_V 0x80
  77. /////////////////////////////////////////////////////////////////////////////
  78. // Globals and Singletons
  79. struct LogoInfo_TAG {
  80. enLogoSource eSource;
  81. struct {
  82. UINT8 ucYComponent;
  83. UINT8 ucUComponent;
  84. UINT8 ucVComponent;
  85. } bgColor;
  86. } g_LogoInfo= { eStartup, { BLACK_Y, BLACK_U, BLACK_V } };
  87. /////////////////////////////////////////////////////////////////////////////
  88. // Public Services
  89. void Logo_setBackgroundColor(UINT8 ucY_Component, UINT8 ucU_Component, UINT8 ucV_Component)
  90. {
  91. g_LogoInfo.bgColor.ucYComponent= ucY_Component;
  92. g_LogoInfo.bgColor.ucUComponent= ucU_Component;
  93. g_LogoInfo.bgColor.ucVComponent= ucV_Component;
  94. DEC_LL_BackgroundColor(ucY_Component, ucU_Component, ucV_Component);
  95. return;
  96. }
  97. void Logo_getBackgroundColor(UINT8 *o_pY_Component, UINT8 *o_pU_Component, 
  98.  UINT8 *o_pV_Component)
  99. {
  100. *o_pY_Component= g_LogoInfo.bgColor.ucYComponent;
  101. *o_pU_Component= g_LogoInfo.bgColor.ucUComponent;
  102. *o_pV_Component= g_LogoInfo.bgColor.ucVComponent;
  103. return;
  104. }
  105. void Logo_selectSource(enLogoSource eSoruce)
  106. {
  107. g_LogoInfo.eSource= eSoruce;
  108. return;
  109. }
  110. enLogoSource Logo_getCurrentSource(void)
  111. {
  112. return(g_LogoInfo.eSource);
  113. }
  114. extern CONST DEC_FRAME power_up_logo;
  115. #ifdef EXINOII
  116. extern CONST DEC_FRAME setup_menu_logo;
  117. #endif//EXINOII
  118. #ifdef SUPPORT_TWO_LOGOS
  119. extern CONST DEC_FRAME power_up_logo2;
  120. #endif
  121. void Logo_display(void)
  122. {
  123. switch (g_LogoInfo.eSource)
  124. {
  125. case eJacketPicture:
  126. case eFlash:
  127. break;
  128. case eFrame:
  129. DEC_LL_BackgroundSwitch(DEC_LL_BG_SWITCH_FRAME);
  130. break;
  131. case eBackground:
  132. DEC_LL_BackgroundSwitch(DEC_LL_BG_SWITCH_BACKGROUND);
  133. break;
  134. case eStartup:
  135. DEC_FrameDisplay(&power_up_logo);
  136. break;
  137. #ifdef SUPPORT_TWO_LOGOS
  138. // To Display 2nd Logo for Menu 
  139. case eMenuBackground:
  140. DEC_FrameDisplay(&power_up_logo2);
  141. break;
  142. #endif
  143. default:
  144. tr_printf(("FATAL: Logo_display() Failed: Unknown sourcen"));
  145. return;
  146. }
  147. return;
  148. }
  149. void Logo_clear(void)
  150. {
  151. g_LogoInfo.bgColor.ucYComponent= BLACK_Y;
  152. g_LogoInfo.bgColor.ucUComponent= BLACK_U;
  153. g_LogoInfo.bgColor.ucVComponent= BLACK_V;
  154. DEC_LL_BackgroundColor(BLACK_Y, BLACK_U, BLACK_V);
  155. return;
  156. }