Osd_BmpPalette.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:4k
源码类别:

DVD

开发平台:

C/C++

  1. /**************************************************************
  2. ** FILE
  3. ** Osd_Palette.h
  4. **
  5. ** DESCRIPTION
  6. **   the pallettes of all the bmps of Osd
  7. **
  8. **
  9. **   Creator: feeling,suqiaoli
  10. **   Date:    2004-7-7 17:02
  11. ****************************************************************/
  12. #ifdef OSD_BMP
  13. #define __palette4F(G,B,R,A) 
  14.         ( ((UINT32)((G)&0xff)<<24)|((UINT32)((B)&0xff)<<16)|((UINT32)((R)&0xff)<<8)|(A&0xff) ) 
  15. #define CLUTE_TRANS 0x80808000
  16. #define _WHITE     __palette4F(0xeb,0x80,0x80,0xff)
  17. #define _YELLOW    __palette4F(0xa2,0x8e,0x2c,0xff)
  18. #define _CYAN      __palette4F(0x83,0x2c,0x9c,0xff)
  19. #define _GREEN     __palette4F(0x70,0x,0x2c,0xff)
  20. static const UINT32 g_aPalette_Display_Region0[16] =
  21. {
  22. __palette4F(0xff,0xff,0xff,0x0),
  23.  //__palette4F(0x34,0xa8,0x6b,0xff),
  24.  __palette4F(0x55,0x78,0x8e,0xff),
  25.  __palette4F(0x4a,0x88,0x82,0xff),
  26.  __palette4F(0x32,0x64,0x57,0xff),
  27.  __palette4F(0x3f,0x98,0x76,0xff),
  28.  __palette4F(0x8b,0xb6,0xa1,0xff),
  29.  __palette4F(0x54,0xad,0x7f,0xff),
  30.  __palette4F(0x34,0xa8,0x6b,0xff),  //index = 7, the purple color used as display shadow
  31.  __palette4F(0xd8,0x19,0x0,0xff),
  32.  __palette4F(0x0,0xa4,0x2,0xff),
  33.  __palette4F(0xc2,0xc1,0xc2,0xff),
  34.  __palette4F(0xbd,0x6,0xfb,0xff),
  35.  __palette4F(0x8f,0x2f,0xc9,0xff),
  36.  __palette4F(0x3e,0x27,0x58,0xff),
  37.  __palette4F(0x6d,0x57,0xa6,0xff),
  38.  __palette4F(0x0,0x0,0x0,0x1e),
  39. //__palette4F(0xff,0xff,0xff,0x0), 
  40. };
  41. static const UINT32 g_aPalette_Display_Region1[4] = 
  42. {
  43.     __palette4F(  0x34, 0xA8, 0x6B, 0xff), //background(52, 168, 107)
  44.     __palette4F(  0,    0xff, 0xff, 0),    //transparent
  45.     __palette4F(  0,    0,    0,    0x1e), //blend
  46.     __palette4F(  0xC2, 0xC1, 0xC2, 0xff), //fontcolor(194, 193, 194) 
  47. };
  48. static const UINT32 g_aPalette_Setup_Region1[16] = //palette 1
  49. {
  50.  };
  51. static const UINT32 g_aPalette_Setup_Region2[16] = //palette 2
  52. {
  53. };
  54. static const UINT32 g_aPalette_Setup_Region3[16] = //palette 3
  55. {
  56. };
  57. static const UINT32 g_aPalette_Setup_Region4[16] = //palette 4
  58. {
  59. };
  60. static const UINT32 g_aPalette_Setup_Region5[16] = //palette 5
  61. {
  62. };
  63. /************************************************************
  64.  OSD Header Config
  65.  config 0: color upate|force transparent|pixel resolution[1:0]|reserved|color mode[2:0](0:4 1:16 2:256 4:16bit#1 5:16bit#2)
  66.  config 1: shade[3:0]|blend[3:0]
  67.  config 2: CLUT entries type[1:0](0:16 bit,1:32 bit,2:27 bit)|rgb(0:YCbCr,1:RGB)|swp(0:Normal,1:BYTE swap)|shd(0:Sub,1:Ratio)|Reserved[1:0] 
  68. ************************************************************/
  69. const UINT8 osd_header_config[][3]=
  70. {
  71.       {//display region 0 16 colors
  72.        //config 0
  73.        ((1&0x01) << BIT_CU)|((0) << BIT_FT)|((0 & 0x03) << BIT_PR),      
  74.        //config 1
  75.        ((0xc & 0x0f) << BIT_SHD)| ((0xf & 0x0f) << BIT_BLND),
  76.        //config 2
  77.          V2_CLUT_TYPE(OSDV2_CLUT_32b)| V2_RGB_MODE|V2_SWAP_BYTE_OFF| V2_SHADE_MODE_B
  78.       },
  79.       {//display region 1  4 color
  80.        //config 0
  81.         ((1&0x01) << BIT_CU)|((0) << BIT_FT)|((0 & 0x03) << BIT_PR),
  82.        //config 1
  83.         ((0x0 & 0x0f) << BIT_SHD)| ((0xf & 0x0f) << BIT_BLND),
  84.        //config 2
  85.          V2_CLUT_TYPE(OSDV2_CLUT_32b)| V2_RGB_MODE|V2_SWAP_BYTE_OFF| V2_SHADE_MODE_A
  86.       },
  87. };
  88. const UINT32 *g_aOsdPalette[]=
  89. {
  90. g_aPalette_Display_Region0, //index = 0
  91. g_aPalette_Display_Region1,//index = 1
  92. //g_aPalette_Setup_Region1, //index = 2
  93. //g_aPalette_Setup_Region2,//index = 3
  94. //g_aPalette_Setup_Region3,//index = 4
  95. //g_aPalette_Setup_Region4,//index = 5
  96. //g_aPalette_Setup_Region5,//index = 6
  97. };
  98. /************************************************************
  99.  OSD Header Offset ,data block location
  100. ************************************************************/
  101. #define OSD_16b_BUG
  102. #define ALIGN_32B(x) ((x+31)/32)
  103. const UINT8 osd_header_offset[8] = 
  104. {
  105. ALIGN_32B(16 + 4*4), 
  106. ALIGN_32B(16 + 4*16), 
  107. ALIGN_32B(16 + 4*256), 
  108. ALIGN_32B(16),
  109. ALIGN_32B(16),
  110. ALIGN_32B(16),
  111. ALIGN_32B(16),
  112. ALIGN_32B(16)
  113. };
  114. #endif//ifdef OSD_BMP