video_ad7176.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * (C) Copyright 2000
  3. * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef _VIDEO_AD7176_H_
  24. #define _VIDEO_AD7176_H_
  25. #define VIDEO_ENCODER_NAME "Analog Devices AD7176"
  26. #define VIDEO_ENCODER_I2C_RATE 100000 /* Max rate is 100 kHz */
  27. #define VIDEO_ENCODER_CB_Y_CR_Y /* Use CB Y CR Y format... */
  28. #define VIDEO_MODE_YUYV /* The only mode supported by this encoder */
  29. #undef VIDEO_MODE_RGB
  30. #define VIDEO_MODE_BPP 16
  31. #ifdef VIDEO_MODE_PAL
  32. #define VIDEO_ACTIVE_COLS 720
  33. #define VIDEO_ACTIVE_ROWS 576
  34. #define VIDEO_VISIBLE_COLS 640
  35. #define VIDEO_VISIBLE_ROWS 480
  36. #endif
  37. #ifdef VIDEO_MODE_NTSC
  38. #define VIDEO_ACTIVE_COLS 720
  39. #define VIDEO_ACTIVE_ROWS 525
  40. #define VIDEO_VISIBLE_COLS 640
  41. #define VIDEO_VISIBLE_ROWS 400
  42. #endif
  43. static unsigned char video_encoder_data[] = {
  44. #ifdef VIDEO_MODE_NTSC
  45. 0x04, /* Mode Register 0 */
  46. #ifdef VIDEO_DEBUG_COLORBARS
  47. 0x82,
  48. #else
  49. 0x02, /* Mode Register 1 */
  50. #endif /* VIDEO_DEBUG_COLORBARS */
  51. 0x16, /* Subcarrier Freq 0 */
  52. 0x7c, /* Subcarrier Freq 1 */
  53. 0xf0, /* Subcarrier Freq 2 */
  54. 0x21, /* Subcarrier Freq 3 */
  55. 0x00, /* Subcarrier phase */
  56. 0x02, /* Timing Register 0 */
  57. 0x00, /* Extended Captioning 0 */
  58. 0x00, /* Extended Captioning 1 */
  59. 0x00, /* Closed Captioning 0 */
  60. 0x00, /* Closed Captioning 1 */
  61. 0x00, /* Timing Register 1 */
  62. 0x08, /* Mode Register 2 */
  63. 0x00, /* Pedestal Register 0 */
  64. 0x00, /* Pedestal Register 1 */
  65. 0x00, /* Pedestal Register 2 */
  66. 0x00, /* Pedestal Register 3 */
  67. 0x00 /* Mode Register 3 */
  68. #endif /* VIDEO_MODE_NTSC */
  69. #ifdef VIDEO_MODE_PAL
  70. 0x05, /* Mode Register 0 */
  71. #ifdef VIDEO_DEBUG_COLORBARS
  72. 0x82,
  73. #else
  74. 0x02, /* Mode Register 1 (2) */
  75. #endif /* VIDEO_DEBUG_COLORBARS */
  76. 0xcb, /* Subcarrier Freq 0 */
  77. 0x8a, /* Subcarrier Freq 1 */
  78. 0x09, /* Subcarrier Freq 2 */
  79. 0x2a, /* Subcarrier Freq 3 */
  80. 0x00, /* Subcarrier phase */
  81. 0x0a, /* Timing Register 0 (a) */
  82. 0x00, /* Extended Captioning 0 */
  83. 0x00, /* Extended Captioning 1 */
  84. 0x00, /* Closed Captioning 0 */
  85. 0x00, /* Closed Captioning 1 */
  86. 0x00, /* Timing Register 1 */
  87. 0x08, /* Mode Register 2 (8) */
  88. 0x00, /* Pedestal Register 0 */
  89. 0x00, /* Pedestal Register 1 */
  90. 0x00, /* Pedestal Register 2 */
  91. 0x00, /* Pedestal Register 3 */
  92. 0x00 /* Mode Register 3 */
  93. #endif /* VIDEO_MODE_PAL */
  94. } ;
  95. #endif /* _VIDEO_AD7176_H_ */