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

DVD

开发平台:

Others

  1. /****************************************************************************************
  2.  *  Copyright (c) 2000 ZORAN Corporation, All Rights Reserved
  3.  *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.  *
  5.  *  File: "dvda_asv.h"     20/12/00
  6.  *
  7.  * Description:
  8.  * ============
  9.  * ASV manager functions and data structures
  10.  *
  11.  * Log:
  12.  * ====
  13.  * $Revision: 2 $
  14.  * Last Modified by $Author: Leonh $ at $Modtime: 1/07/04 12:08p $
  15. ****************************************************************************************
  16.  * Updates:
  17. ****************************************************************************************
  18.  * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/dvda_asv.h $
  19.  * 
  20.  * 2     1/07/04 12:17p Leonh
  21.  * Angieh:Merge the code from CES_DB.
  22.  * 
  23.  * 16    12/30/03 10:42a Leonh
  24.  * Angieh:Add #include "Config.h".
  25.  * 
  26.  * 15    12/29/03 3:27p Leonh
  27.  * Angieh:Use another way check the subpicture size instead of change the
  28.  * HLI pack length.
  29.  * 
  30.  * 14    12/23/03 5:53p Leonh
  31.  * Angieh:Add 1 byte to avoid the highlight data lack of one byte.
  32.  * 
  33.  * 13    12/21/03 4:46p Leonh
  34.  * Angieh:Support for the Bookmark Play.
  35.  * 
  36.  * 12    11/12/03 12:45p Leonh
  37.  * add function for subpicture size
  38.  * 
  39.  * 11    11/06/03 8:34a Leslie
  40.  * clean up the code
  41.  * 
  42.  * 10    11/03/03 2:53p Leslie
  43.  * add the define for save logo 
  44.  * 
  45.  * 9     10/20/03 11:46a Leslie
  46.  * check the variable type and change the dvda rtpb schedule way as the
  47.  * same with DVD Video
  48.  * 
  49.  * 8     10/16/03 10:50a Leslie
  50.  * change the way to get the nav pointer after cache
  51.  * 
  52.  * 7     10/15/03 8:52a Leslie
  53.  * stream subpicture when asv display
  54.  * 
  55.  * 6     10/14/03 11:46a Leslie
  56.  * add dvd audio support
  57.  * 
  58.  * 5     10/14/03 11:19a Leslie
  59.  * add dvd audio support
  60.  * 
  61.  * 4     8/20/03 8:23p Leonh
  62.  * finish some API for ASV
  63.  * 
  64.  * 3     03-05-12 10:01 Leonh
  65.  * 
  66.  * 2     03-05-12 9:34 Leonh
  67.  * 
  68.  * 1     03-05-08 18:16 Leonh
  69.  * 
  70.  * 1     10/24/02 14:21 Rinata
  71.  * 
  72.  * 14    2/12/02 7:44p Bhupeshv
  73.  * Merged VaddisPlayerV fixes.
  74.  * 
  75.  * 12    10/10/01 16:45 Nirp
  76.  * assafm:
  77.  * Fixed Prev / Next DLIST bug.
  78.  * Fixed bug in ASV change during same ASVU range.
  79.  * + Bhupesh integration 1008  + Tia 1009
  80.  * 
  81.  * 11    10/03/01 18:11 Rinata
  82.  * Finik+ Bhupesh + Assaf + Tia : Navigation fixes
  83.  * 
  84.  * 10    9/30/01 12:08 Rinata
  85.  * Bhupesh,Finik, Assaf and  Tia navigator bugs fixes 
  86.  * 
  87.  * 9     8/21/01 5:22 Nirp
  88.  * 
  89.  * 8     8/05/01 17:15 Rinata
  90.  * Integration (cy)
  91.  * 
  92.  * 8     7/31/01 11:37 Assafm
  93.  * Bug fixes
  94.  * 
  95.  * 7     7/05/01 9:55 Yarone
  96.  * remove cast warning
  97.  * 
  98.  * 6     6/14/01 14:16 Rinata
  99.  * Assaf
  100.  * 
  101.  * 5     17-04-01 14:38 Assafm
  102.  * 
  103.  * 4     17-04-01 11:36 Assafm
  104.  * 
  105.  * 3     27-03-01 14:55 Assafm
  106.  * 
  107.  * 2     21-03-01 15:25 Assafm
  108.  * 
  109.  * 1     22-01-01 11:16 Assafm
  110.  * 
  111.  * 2     20/12/00 11:44 Finik
  112.  * 1     10-12-00 15:21 Assafm
  113.  * 
  114.  * 1     28-11-00 17:59 Assafm
  115.  Revision 1.1  2000/04/27 17:17:39  tia                                                              
  116.  Initial revision                                                              
  117. */
  118. /**************************************************************************************/
  119. #include "Config.h" // Global Configuration - do not remove!
  120. #ifdef DVD_AUDIO_SUPPORT
  121. #ifndef _DVDA_ASV_H
  122. #define _DVDA_ASV_H
  123. #include "playcorecoremaincoremain.h"
  124. #include "PlaycoreNav_DVDHeadernavdef.h"
  125. #include "DecoderDec_defs.h"
  126. #define   ASVOBS_SP_PLT_NUM 16
  127. #define   ASVU_ATR_NUM          4
  128. #define   MAX_ASV_SRPS          100   /*  maximum search pointers for cached ASVs  */
  129. #ifdef NO_SCPAD
  130. #define  asv_Get_ASV_HLI_SS(ptr)   asv_Get_ASV_HLI_word(ptr,0)
  131. #define  asv_Get_ASV_HLI_S_PTM(ptr)   asv_Get_ASV_HLI_dword(ptr,2)
  132. #define  asv_Get_ASV_HLI_E_PTM(ptr)   asv_Get_ASV_HLI_dword(ptr,6)
  133. #define  asv_Get_ASV_BTN_SL_E_PTM(ptr)   asv_Get_ASV_HLI_dword(ptr,10)
  134. #define  asv_Get_ASV_BTN_MD(ptr)   asv_Get_ASV_HLI_word(ptr,14)
  135. #define  asv_Get_ASV_BTN_OFN(ptr)   asv_Get_ASV_HLI_byte(ptr,16)
  136. #define  asv_Get_ASV_BTN_Ns(ptr)   asv_Get_ASV_HLI_byte(ptr,17)
  137. #define  asv_Get_ASV_NSL_BTN_Ns(ptr)   asv_Get_ASV_HLI_byte(ptr,18)
  138. #else
  139. #define  asv_Get_ASV_HLI_SS(asvn)   asv_Get_ASV_HLI_word(asvn, 0)
  140. #define  asv_Get_ASV_HLI_S_PTM(asvn)   asv_Get_ASV_HLI_dword(asvn, 2)
  141. #define  asv_Get_ASV_HLI_E_PTM(asvn)   asv_Get_ASV_HLI_dword(asvn, 6)
  142. #define  asv_Get_ASV_BTN_SL_E_PTM(asvn)   asv_Get_ASV_HLI_dword(asvn, 10)
  143. #define  asv_Get_ASV_BTN_MD(asvn)   asv_Get_ASV_HLI_word(asvn, 14)
  144. #define  asv_Get_ASV_BTN_OFN(asvn)   asv_Get_ASV_HLI_byte(asvn, 16)
  145. #define  asv_Get_ASV_BTN_Ns(asvn)   asv_Get_ASV_HLI_byte(asvn, 17)
  146. #define  asv_Get_ASV_NSL_BTN_Ns(asvn)   asv_Get_ASV_HLI_byte(asvn, 18)
  147. #endif
  148. #define PREV_DLIST   -1
  149. #define NEXT_DLIST   -2
  150. #define HOME_DLIST   -3
  151. #define ASV_HLI_PACK_LENGHT  ( 6 + 1 + 694 + 50)
  152. #define SP_TEMP_BUFFER_NUM 32// bytes
  153. typedef struct  {
  154. BYTE   ASV_Ns;  /*  number of ASVs */
  155. BYTE   ASVU_ATRN;  /* attribute number  */
  156. WORD   FirstABS_ASVN;
  157. DWORD  StartAddr;   /*  start address of ASVU  */
  158. }  S_ASVU_GI;
  159. typedef struct  {
  160. S_ASVU_GI    ASVU_GI;
  161. DWORD   ASVOBS_SA;           /*  Start address of ASVOBS  */
  162. DWORD   ASVOBS_EA;           /*  Start address of ASVOBS  */
  163. #ifdef NO_SCPAD
  164. DWORD   ASVOBS_SP_PLT[ASVOBS_SP_PLT_NUM];   /*  sub picture palletes    */
  165. #else
  166. S_SC_STORAGE  asvobs_sp_plt_st;
  167. #endif
  168. WORD ASVU_Ns;             /*  number of ASV units  */
  169. DWORD ASVU_Size;
  170. #ifdef NO_SCPAD
  171. WORD    ASVU_ATR[ASVU_ATR_NUM];         /*  Attributes */
  172. WORD    ASV_SA[MAX_ASV_SRPS];
  173. #else
  174. S_SC_STORAGE  asvu_atr_sc_st;
  175. S_SC_STORAGE  asv_sa_sc_st;
  176. #endif
  177. WORD ASV_PBI_SA; //ZORAN BMV1001
  178. // short   NextASVEventSlot;
  179. BYTE    CurrentASVU;
  180. BYTE    Initialized;
  181. BYTE    NumASVs;
  182. BYTE    MaxDList;
  183. #ifdef NO_SCPAD
  184. BYTE *ASV_HLI_Ptr;
  185. #else
  186. S_SC_STORAGE asv_hli_info_sc_st;
  187. #endif
  188. BYTE    CurrentASV_DMD;
  189. #ifdef NO_SCPAD
  190. BYTE *DLISTShuffleVector;
  191. #else
  192. S_SC_STORAGE dlist_shuffle_vector_sc_st;
  193. #endif
  194. BYTE    DLISTShuffleVectorSize;
  195. BYTE DLISTShuffleVectorIdx;
  196. BYTE DLISTShuffleVectorIdxDirection;  
  197. BYTE    SelectedButtonGroup;
  198. BYTE    SelectedButtonNumOfGroups;
  199. BYTE ResumeDlist;
  200. BOOL CHANGE_ASV;
  201. }  S_ASV;
  202. BOOL  asv_construct(void);
  203. void asv_delete(void);
  204. BOOL  asv_CacheASVU(int asvun);
  205. BOOL  asv_DisplayASV(BYTE asvn);
  206. WORD  asv_GetASVUAttr(int num);
  207. BOOL  asv_UNCacheASVU(void);
  208. #ifdef NO_SCPAD
  209. BOOL asv_ShuffleDList(S_STORAGE *st,int start_offset,int dlist_size,int num_asv);
  210. #else
  211. BOOL asv_ShuffleDList(S_SC_STORAGE*st,int start_offset,int dlist_size,int num_asv);
  212. #endif
  213. BOOL asv_ShuffleBrowsableDList(int size);
  214. DWORD asv_Get_HLI_Sa(BYTE asvn);
  215. DWORD asv_Get_StillPicture_Sa(BYTE asvn);
  216. // the next routines fetch data (which might be unaligned so a pointer reference
  217. // may not work) from the ASV_HLI struct   
  218. BYTE   asv_Get_ASV_HLI_byte(BYTE asvn,UINT16 offset);
  219. WORD   asv_Get_ASV_HLI_word(BYTE asvn,UINT16 offset);
  220. DWORD  asv_Get_ASV_HLI_dword(BYTE asvn,UINT16 offset);
  221. BOOL  asv_ScheduleASV(int dlist_num,int nav_cmd);
  222. void    asv_ASVIsDisplayed(void);
  223. /*  HLI packets handling  */
  224. BOOL asv_hli_Button_Select(int button,int valid_auto_activate);
  225. BOOL asv_hli_Adjacent_Button_Select  ( long UOP ); 
  226. BOOL asv_Button_Activate( int button, unsigned char *cmdraw);
  227. DWORD asv_CurrSubPicSize(BYTE asvn);
  228. void asv_Display_SubPicture(DWORD sp_size);
  229. void  asv_StoreAsvPointer(void);
  230. #endif  //DVD_AUDIO_SUPPORT
  231. #endif /* _DVDA_ASV_H  */