⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yuv.lst

📁 Bitek 公司 bit1611b模拟屏驱动芯片外接MCU驱动DEMO源码
💻 LST
📖 第 1 页 / 共 3 页
字号:
 211   1          // Look-Up Table Approach
 212   1          BITEK_TxBurst(YUV_MAD, VP_101_AFE_ATTR, sizeof(abYUV_0101_0137), abYUV_0101_0137);
 213   1      
 214   1          LED_RED_BLINK_OFF;
 215   1          LED_RED_OFF;
 216   1      
 217   1      
 218   1          // Brightness
 219   1          YUV_SetBrightness(tsEYD.bBrightness);
 220   1      
 221   1          // Contrast
 222   1          YUV_SetContrast(tsEYD.bContrast);
 223   1      
 224   1          // Saturation
 225   1          YUV_SetSaturation(tsEYD.bSaturation);
 226   1      
 227   1          // Hue
 228   1          YUV_SetHue(tsEYD.bHue);
 229   1      
 230   1          // Sharpness !
 231   1          YUV_SetSharpness(tsEYD.bSharpness);
 232   1      
 233   1          // BlackLevel !
 234   1          YUV_SetBlackLevel(tsEYD.bBlackLevel);
 235   1      
 236   1          #if (YUV_GO_POOLING)
 237   1          fYUV_Go_Pooling = TRUE;
 238   1          #endif
 239   1      } // YUV_Init
 240          
C51 COMPILER V7.50   YUV                                                                   02/05/2007 16:33:26 PAGE 5   

 241          
 242          /* -------------------------------------------------------------------
 243              Name: YUV_Ready - (YUV_01_BIT1611B)
 244              Purpose: To check whether video signal is locked.
 245              Passed: None.
 246              Returns:
 247                  TRUE if video signal is locked.
 248              Notes:
 249             ------------------------------------------------------------------- */
 250          BOOL YUV_Ready (void)
 251          {
 252   1          switch (tsEYD.bYUV_ID)
 253   1          {
 254   2              case YUV_ID_CVBS_11:
 255   2              case YUV_ID_CVBS_21:
 256   2              case YUV_ID_YC_Y12C22:
 257   2                  // CVBS or S-Video
 258   2                  ////////////////////////////////////////////////////////////////////
 259   2                  // [00001] Revised by LH 19:10PM  2006/01/02
 260   2                  if ((bYUV_SB & VP_MASK_STATUS_LOCK) == VP_MASK_STATUS_LOCK)
 261   2                  ////////////////////////////////////////////////////////////////////
 262   2                      return( TRUE );
 263   2                  else
 264   2                      return( FALSE );
 265   2                  break;
 266   2          } // switch
 267   1      } // YUV_Ready
 268          
 269          
 270          
 271          
 272          
 273          #define DSUB_640X400_70_4142    0x01C1
 274          #define DSUB_720X400_70_4142    0x01C1
 275          
 276          #define DSUB_VGA60_4142         0x020D
 277          #define DSUB_SVGA50_4142        0x0271
 278          #define DSUB_SVGA60_4142        0x0275
 279          
 280          #define DSUB_640X400_CRITERIA   ((DSUB_640X400_70_4142 + DSUB_VGA60_4142)   / 2)
 281          #define DSUB_VGA60_CRITERIA     ((DSUB_VGA60_4142      + DSUB_SVGA50_4142)  / 2)
 282          #define DSUB_SVGA50_CRITERIA    ((DSUB_SVGA50_4142     + DSUB_SVGA60_4142)  / 2)
 283          
 284          
 285          /* -------------------------------------------------------------------
 286              Name: YUV_GetColorStandard - (YUV_01_BIT1611B)
 287              Purpose: To detect Color Standard mode.
 288              Passed: None.
 289              Returns:
 290                  YUV_CS_NTSC         if NTSC/M
 291                  YUV_CS_PAL_BGDHI    if PAL B/G/D/H/I
 292                  YUV_CS_SECAM_L      if SECAM/L
 293                  YUV_CS_NONE         if others
 294              Notes:
 295          
 296                          0x39    0x3A    0x3B    0x40    0x41    0x42
 297              640x400@70  19      38      33      BF      C1      11
 298              720x400@70  69      88      33      02      C1      01
 299          
 300              640x480@60  F9      18      23      0B      0D      22
 301              800x600@50  48      58      33      6C      71      22
 302              800x600@60  00      1F      44      70/71   74/75   22
C51 COMPILER V7.50   YUV                                                                   02/05/2007 16:33:26 PAGE 6   

 303          
 304              YPbPr 480i  39      58      33      06/07   0E/11   01
 305              YPbPr 576i  39      58      33      06      40      01
 306              YPbPr 480p  39      58      33      06      0D      02
 307              YPbPr 576p  39      58      33      05      71      02
 308          
 309              SCART 480i  56      58      33      06      40      01
 310              SCART 576i  01      58      03      06/07   0E/11   01
 311          
 312             ------------------------------------------------------------------- */
 313          UB8 YUV_GetColorStandard (void)
 314          {
 315   1          switch (tsEYD.bYUV_ID)
 316   1          {
 317   2              case YUV_ID_CVBS_11:
 318   2              case YUV_ID_CVBS_21:
 319   2              case YUV_ID_YC_Y12C22:
 320   2                  if (bYUV_SB & VP_MASK_FIDT)
 321   2                      return( YUV_CS_NTSC );                  // 60 Hz
 322   2                  else
 323   2                      return( YUV_CS_PAL );                   // 50 Hz
 324   2                  break;
 325   2          }
 326   1      } // YUV_GetColorStandard
 327          
 328          
 329          #if (YUV_SET_BLACKLEVEL)
 330          /* -------------------------------------------------------------------
 331              Name: YUV_SetBlackLevel - (YUV_01_BIT1611B)
 332              Purpose: To set the brightness of Video Decoder.
 333              Passed:
 334                  UB8 bBrightness = 0..255
 335              Returns: None.
 336              Notes: [1]98
 337             ------------------------------------------------------------------- */
 338          void YUV_SetBlackLevel (UB8 bBlackLevel)
 339          {
 340   1          BITEK_TxByte(YUV_MAD, VP_108_DVP_BLACKLEVEL, bBlackLevel);
 341   1      } // YUV_SetBlackLevel
 342          #endif
 343          
 344          
 345          #if (YUV_SET_BRIGHTNESS)
 346          /* -------------------------------------------------------------------
 347              Name: YUV_SetBrightness - (YUV_01_BIT1611B)
 348              Purpose: To set the brightness of Video Decoder.
 349              Passed:
 350                  UB8 bBrightness = 0..255
 351              Returns: None.
 352              Notes: [1]98
 353             ------------------------------------------------------------------- */
 354          void YUV_SetBrightness (UB8 bBrightness)
 355          {
 356   1          BITEK_TxByte(YUV_MAD, VP_106_DVP_BRIGHTNESS, bBrightness ^ 0x80);
 357   1      } // YUV_SetBrightness
 358          #endif
 359          
 360          
 361          #if (YUV_SET_CONTRAST)
 362          /* -------------------------------------------------------------------
 363              Name: YUV_SetContrast - (YUV_01_BIT1611B)
 364              Purpose: To set the contrast of Video Decoder.
C51 COMPILER V7.50   YUV                                                                   02/05/2007 16:33:26 PAGE 7   

 365              Passed:
 366                  UB8 bContrast = 0..255
 367              Returns: None.
 368              Notes:
 369             ------------------------------------------------------------------- */
 370          void YUV_SetContrast (UB8 bContrast)
 371          {
 372   1          BITEK_TxByte(YUV_MAD, VP_107_DVP_CONTRAST, bContrast);
 373   1      } // YUV_SetContrast
 374          #endif
 375          
 376          
 377          #if (YUV_SET_HUE)
 378          /* -------------------------------------------------------------------
 379              Name: YUV_SetHue - (YUV_01_BIT1611B)
 380              Purpose: To set the hue of Video Decoder.
 381              Passed:
 382                  UW16 bHue = 0..255
 383              Returns: None.
 384              Notes:
 385             ------------------------------------------------------------------- */
 386          void YUV_SetHue (UB8 bHue)
 387          {
 388   1          BITEK_TxByte(YUV_MAD, VP_10A_DVP_HUE, bHue);
 389   1      } // YUV_SetHue
 390          #endif
 391          
 392          
 393          #if (YUV_SET_SATURATION)
 394          /* -------------------------------------------------------------------
 395              Name: YUV_SetSaturation - (YUV_01_BIT1611B)
 396              Purpose: To set the saturation of Video Decoder.
 397              Passed:
 398                  UB8 bSaturation = 0..127
 399              Returns: None.
 400              Notes:
 401             ------------------------------------------------------------------- */
 402          void YUV_SetSaturation (UB8 bSaturation)
 403          {
 404   1          BITEK_TxByte(YUV_MAD, VP_109_DVP_SATURATION, bSaturation);
 405   1      } // YUV_SetSaturation
 406          #endif
 407          
 408          
 409          #if (YUV_SET_SHARPNESS)
 410          /* -------------------------------------------------------------------
 411              Name: YUV_SetSharpness - (YUV_01_BIT1611B)
 412              Purpose: To set the sharpness of Video Decoder.
 413              Passed:
 414                  UB8 bSharpness = 0..0x7F
 415              Returns: None.
 416              Notes:
 417             ------------------------------------------------------------------- */
 418          void YUV_SetSharpness (UB8 bSharpness)
 419          {
 420   1          #ifdef NOT_JUNK
                  switch (tsEYD.bYUV_ID)
                  {
                      case YUV_ID_CVBS_11:
                      case YUV_ID_CVBS_21:
                      case YUV_ID_YC_Y12C22:
                          BITEK_TxByte(YUV_MAD, VP_105_LUMA_ATTR, bSharpness);
C51 COMPILER V7.50   YUV                                                                   02/05/2007 16:33:26 PAGE 8   

                          break;
                  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -