home *** CD-ROM | disk | FTP | other *** search
/ IRIS Development Option 6.2 / IRIS_Development_Option_6.2_814-0478-001.iso / dist / dmedia_dev.idb / usr / include / dmedia / vl_sirius.h.z / vl_sirius.h
C/C++ Source or Header  |  1996-03-14  |  11KB  |  298 lines

  1. /*
  2.  * dev_sirius.h
  3.  *
  4.  *    device-dependant header file for sirius video
  5.  *
  6.  *
  7.  * Copyright 1993, Silicon Graphics, Inc.
  8.  * All Rights Reserved.
  9.  *
  10.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  11.  * the contents of this file may not be disclosed to third parties, copied or
  12.  * duplicated in any form, in whole or in part, without the prior written
  13.  * permission of Silicon Graphics, Inc.
  14.  *
  15.  * RESTRICTED RIGHTS LEGEND:
  16.  * Use, duplication or disclosure by the Government is subject to restrictions
  17.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  18.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  19.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  20.  * rights reserved under the Copyright Laws of the United States.
  21.  */
  22.  
  23. #ident "$Revision: 1.33 $"
  24.  
  25. #ifndef DEV_SIRIUS_H
  26. #define    DEV_SIRIUS_H
  27.  
  28. /*
  29.  * Sirius Device Dependant Controls
  30.  */
  31.  
  32. /* Device related controls
  33.  */
  34. #define VL_SIR_DEV_BASE        (('S'<<24)|('I'<<16))
  35.  
  36.  
  37. /* VL_DEFAULT_SOURCE defines */
  38. #define      SIR_SRC_DIGITAL_VIDEO_1    0
  39. #define      SIR_SRC_DIGITAL_VIDEO_2    1
  40. #define      SIR_SRC_ANALOG_VIDEO    2
  41. #define      SIR_SRC_GRAPHICS        3
  42. #define      SIR_SRC_MEMORY        4
  43.  
  44.  
  45. /* VL_PACKING formats for Sirius Texture node */
  46. /* These formats are for Reality Engine Graphics */
  47. #define      SIR_TEX_PACK_RGB_5        0x1000
  48. #define      SIR_TEX_PACK_RGBA_4    0x1001
  49. #define      SIR_TEX_PACK_RGBA_8    0x1002
  50.  
  51. /* These formats are for Infinite Reality Graphics */
  52. #define      SIR_PACK_RGB_8        0x1000
  53. #define      SIR_PACK_RGBA_6        0x1001
  54. #define      SIR_PACK_RGBA_12        0x1002
  55. #define      SIR_PACK_YYYY_12        0x1003
  56.  
  57. /* Graphics related controls
  58.  */
  59. #define   VL_SIR_GFX_SIZE      (VL_SIR_DEV_BASE + 0)
  60.  
  61. /* Analog Video related controls
  62.  */
  63. #define   VL_SIR_RED_GAIN      (VL_SIR_DEV_BASE + 1)
  64. #define   VL_SIR_GREEN_GAIN      (VL_SIR_DEV_BASE + 2)
  65. #define   VL_SIR_BLUE_GAIN      (VL_SIR_DEV_BASE + 3)
  66. #define   VL_SIR_ALPHA_GAIN      (VL_SIR_DEV_BASE + 4)
  67. #define   VL_SIR_RED_OFFSET      (VL_SIR_DEV_BASE + 5)
  68. #define   VL_SIR_GREEN_OFFSET      (VL_SIR_DEV_BASE + 6)
  69. #define   VL_SIR_BLUE_OFFSET      (VL_SIR_DEV_BASE + 7)
  70. #define   VL_SIR_ALPHA_OFFSET      (VL_SIR_DEV_BASE + 8)
  71. #define   VL_SIR_AUTO_GAIN_CONTROL (VL_SIR_DEV_BASE + 9)
  72.  
  73. /* Digital Video related controls
  74.  */
  75. #define   VL_SIR_FILTER          (VL_SIR_DEV_BASE + 10)
  76. #define   VL_SIR_LINK_DELAY_A      (VL_SIR_DEV_BASE + 11)
  77. #define   VL_SIR_LINK_DELAY_B      (VL_SIR_DEV_BASE + 12)
  78.  
  79.  
  80. /* Sync related controls
  81.  */
  82. #define   VL_SIR_SYNC_LEVEL      (VL_SIR_DEV_BASE + 13)
  83. #define      SIR_SYNC_LEVEL_VIDEO   1   /* 1 Volt peak to peak */
  84. #define      SIR_SYNC_LEVEL_TTL        4   /* 4 Volts peak to peak */
  85. #define   VL_SIR_GENLOCK_LEVEL    (VL_SIR_DEV_BASE + 14)
  86. #define      SIR_SYNC_STANDALONE    1
  87. #define      SIR_SYNC_HOUSE        2    /* Genlock connector */
  88. #define      SIR_SYNC_DIGITAL_1        3
  89. #define      SIR_SYNC_DIGITAL_2        4
  90. #define      SIR_SYNC_YC        5
  91. #define      SIR_SYNC_COMPOSITE        6
  92. #define      SIR_SYNC_COMPONENT        7  /* Component Sync connector */
  93. #define      SIR_SYNC_GREEN        8
  94. #define   VL_SIR_SYNC_BURSTLOCK      (VL_SIR_DEV_BASE + 15)
  95.  
  96.  
  97. /* Phase related controls
  98.  */
  99. #define   VL_SIR_H_PHASE_ALPHA      (VL_SIR_DEV_BASE + 16)
  100. #define   VL_SIR_SCH_PHASE      (VL_SIR_DEV_BASE + 17)
  101.  
  102. /*
  103.  * Transfers to or from the Sirius board can be triggered from one of three
  104.  * possible sources: the on-board VLAN transmitter's frame coincidence pulse,
  105.  * GPI input 1, or GPI input 2.
  106.  */
  107. #define   VL_SIR_TRIGGER      (VL_SIR_DEV_BASE + 18)
  108. #define      SIR_TRIGGER_NONE        0
  109. #define      SIR_TRIGGER_GPI_1        1
  110. #define      SIR_TRIGGER_GPI_2        2
  111. #define      SIR_TRIGGER_VLAN        3
  112.  
  113. /*
  114.  * VLAN related controls
  115.  */
  116. #define   VL_SIR_VLAN_NODE      (VL_SIR_DEV_BASE + 19)
  117. #define   VL_SIR_VLAN_INIT      (VL_SIR_DEV_BASE + 20)
  118. #define   VL_SIR_VLAN_STATUS      (VL_SIR_DEV_BASE + 21)
  119. #define   VL_SIR_VLAN_CMD      (VL_SIR_DEV_BASE + 22)
  120.  
  121. /*
  122.  * GPI related controls
  123.  *
  124.  * The transfer start notify trigger will wiggle the GPI output line at the
  125.  * start of a DMA transfer (driving it low for 20msec).  If a GPI trigger
  126.  * event is requested, the transfer will pause and wait for a GPI event to
  127.  * come from the external device.  When/If this event is recevied, the
  128.  * read/write dma transfer proceeds.  When the last dma request has been
  129.  * serviced, we check to see if an end transfer notify trigger was requested;
  130.  * if so, we pull the requested GPI line low for 20msec.
  131.  */
  132. #define   VL_SIR_GPI_XFER_START_NOTIFY      (VL_SIR_DEV_BASE + 23)
  133. #define   VL_SIR_GPI_XFER_STOP_NOTIFY      (VL_SIR_DEV_BASE + 24)
  134.  
  135. /*
  136.  * The GPI input can be configured in one of two possible states:
  137.  *
  138.  * 1.  Active Low (also known as the Abekas switch closure mode):
  139.  *
  140.  *     In this mode, the triggering device (e.g. the Abekas) must drive
  141.  *     the GPI_IN + line low with its GPI_OUT + line.  The GPI_IN - line from
  142.  *     the triggering device should be connected to the Sirius BOB's ground
  143.  *     pin (pin 5 on the DB-9).
  144.  *
  145.  * 2.  Active High:
  146.  *
  147.  *     In this mode, the triggering device must drive the GPI_IN + line high
  148.  *     with its GPI_OUT + line.  The GPI_IN - line from the triggering device
  149.  *     should be connected to the Sirius BOB's ground pin (pin 5 on the DB-9).
  150.  *
  151.  *     The pinout for the 9 pin D-subminature connector for the GPI on the
  152.  *     Sirius Break-out Box (BOB) follows:
  153.  *
  154.  *     <1> VL_SIR_GPI_CHAN1_IN +
  155.  *     <6> VL_SIR_GPI_CHAN1_IN -
  156.  *     <2> VL_SIR_GPI_CHAN2_IN +
  157.  *     <7> VL_SIR_GPI_CHAN2_IN -
  158.  *
  159.  *     <3> VL_SIR_GPI_CHAN1_OUT +
  160.  *     <8> VL_SIR_GPI_CHAN1_OUT -
  161.  *     <4> VL_SIR_GPI_CHAN2_OUT +
  162.  *     <9> VL_SIR_GPI_CHAN2_OUT -
  163.  *
  164.  *     <5> Ground
  165.  *
  166.  */
  167. #define   VL_SIR_GPI_CHAN1_IN_MODE    (VL_SIR_DEV_BASE + 25)
  168. #define   VL_SIR_GPI_CHAN2_IN_MODE    (VL_SIR_DEV_BASE + 26)
  169.  
  170. #define      SIR_GPI_IN_MODE_ACTIVE_LOW            1
  171. #define      SIR_GPI_IN_MODE_ABEKAS_SWITCH_CLOSURE    1
  172. #define      SIR_GPI_IN_MODE_ACTIVE_HIGH        3
  173.  
  174. /*
  175.  * The GPI output can either be driven high or driven low.  When it is
  176.  * driven high, the photovoltaic relay is reverse biased and turned off,
  177.  * which induces a high resistance between the GPI_OUT[1,2] + and
  178.  * GPI_OUT[1,2] - * terminals on the 9 pin D-sub connector.  When it is
  179.  * driven low, the photovoltaic relay turns on, and there is effectively
  180.  * no resistance between the + and - terminals; this is called 'Abekas
  181.  * switch closure mode' in the Abekas documentation.
  182.  */
  183.  
  184. #define   VL_SIR_GPI_OUT_CHAN1        (VL_SIR_DEV_BASE + 27)
  185. #define   VL_SIR_GPI_OUT_CHAN2        (VL_SIR_DEV_BASE + 28)
  186.  
  187. #define      SIR_GPI_OUT_ON        0
  188. #define      SIR_GPI_OUT_OFF        1
  189.  
  190. /*
  191.  * KEYGEN ( Chroma Key generator) controls
  192.  */
  193. #define        VL_SIR_KEYGEN_A_VALUE    (VL_SIR_DEV_BASE + 29) /* V or R */
  194. #define        VL_SIR_KEYGEN_A_RANGE    (VL_SIR_DEV_BASE + 30)
  195. #define        VL_SIR_KEYGEN_A_SOFTNESS    (VL_SIR_DEV_BASE + 31)
  196.  
  197. #define        VL_SIR_KEYGEN_B_VALUE    (VL_SIR_DEV_BASE + 32) /* Y or G */
  198. #define        VL_SIR_KEYGEN_B_RANGE    (VL_SIR_DEV_BASE + 33)
  199. #define        VL_SIR_KEYGEN_B_SOFTNESS    (VL_SIR_DEV_BASE + 34)
  200.  
  201. #define        VL_SIR_KEYGEN_C_VALUE    (VL_SIR_DEV_BASE + 35) /* U or B */
  202. #define        VL_SIR_KEYGEN_C_RANGE    (VL_SIR_DEV_BASE + 36)
  203. #define        VL_SIR_KEYGEN_C_SOFTNESS    (VL_SIR_DEV_BASE + 37)
  204.  
  205. /*
  206.  *    The VL_SIR_KEYGEN_MATRIX defines conversion from YUV space
  207.  *    to the desired key generation space.
  208.  *    THe default is an identity matrix.
  209.  *    For example the matrix for conversion from YUV space
  210.  *     to RGB space is:
  211.  *
  212.  *    {  1.401687,  1.000000, -0.000927 }
  213.  *      { -0.714169,  1.000000, -0.343695 }
  214.  *      {  0.000990,  1.000000,  1.772160 }
  215.  */
  216. #define        VL_SIR_KEYGEN_MATRIX        (VL_SIR_DEV_BASE + 38)
  217.  
  218. /*
  219.  *
  220.  */
  221. #define        VL_SIR_GFX_FLICKER          (VL_SIR_DEV_BASE + 39)
  222.  
  223. /*
  224.  * vlists - a way of changing board parameters without video disturbance
  225.  */
  226. #define     VL_SIR_VLIST_ENABLE         (VL_SIR_DEV_BASE + 40)
  227.  
  228. /*
  229.  * The following two controls are associated with the Sirius video drain.
  230.  *
  231.  * The analog output of the Sirius board has a blanking enable; when set, 
  232.  * the video signal will be blanked for the duration of the frame.  
  233.  * When clear, normal vertical/horizontal blanking ensues.
  234.  * 
  235.  * This control is provided so that users may turn off the analog output's 
  236.  * signal when running digital output formats; when the board is run in a 
  237.  * digital format, the analog output runs, but with incorrect timing.
  238.  *
  239.  * For orthogonality, a similar control is provided to allow individual
  240.  * control on the digitial video output.  The VL_SIGNAL control may be used
  241.  * to effect blanking on both outputs simultaneously;  a control changed 
  242.  * event will be issued to update the status of the individual analog and
  243.  * digital drain enables accordingly.
  244.  */
  245. #define        VL_SIR_ANALOG_DRAIN_BLANK_ENABLE    (VL_SIR_DEV_BASE + 41)
  246. #define        VL_SIR_DIGITAL_DRAIN_BLANK_ENABLE    (VL_SIR_DEV_BASE + 42)
  247.  
  248. /*
  249.  * Sirius provides user-selectable field dominance for the video input or
  250.  * video output nodes.  Users will typically want to edit on F1 boundaries, 
  251.  * where F1 is defined as the first field in the video standards two field
  252.  * output sequence.  525 standards send the second (whole) raster line out to 
  253.  * begin the first field, and the first (half) raster line out to begin the 
  254.  * second field; 625 standards send the first (half) raster line out to begin
  255.  * the first field, and the second (whole) raster line to begin the second
  256.  * field.  Some users may want to edit on F2 boundaries, which falls on the
  257.  * field in between the video standard's frame boundary.  To do so, use this
  258.  * control, then program your deck to select F2 edits.
  259.  *
  260.  * When toggling field dominance, you will have to reverse the frame
  261.  * de-interleaving (on output) or interleaving (on input).  For details,
  262.  * consult the user's guide or release notes.
  263.  */
  264. #define     VL_SIR_FIELD_DOMINANCE        (VL_SIR_DEV_BASE + 43)
  265.  
  266. #define      SIR_F1_IS_DOMINANT            1
  267. #define      SIR_F2_IS_DOMINANT            2
  268.  
  269. /* following is used in subtexload call for gl side (video) texturing */
  270. #define SIR_VEN_16BIT_TEXEL        3
  271. #define SIR_VEN_32BIT_TEXEL        4
  272.  
  273. /* following is used in gl side code using gfx drain (see examples) */
  274. #define SIR_VEN_SKIP                    6970
  275. #define SIR_VEN_INTERFACE               1005
  276. #define SIR_VEN_VIDEOCOPY               9000
  277.  
  278. #define SIR_VEN_PIXMODE_SKIP_LINES(skip) {                      \
  279.     long sirven_buf[2];                                         \
  280.     sirven_buf[0] = SIR_VEN_SKIP;                               \
  281.     sirven_buf[1] = (skip);                                     \
  282.     glcompat(SIR_VEN_INTERFACE, (long) sirven_buf);             \
  283. }
  284.  
  285. #define SIR_VEN_RECTCOPY_VIDEO_FIELD(field_width,field_height,newx,newy) { \
  286.     long sirven_buf[6];                                         \
  287.     sirven_buf[0] = (field_width);                              \
  288.     sirven_buf[1] = (field_height);                             \
  289.     sirven_buf[2] = (newx);                                     \
  290.     sirven_buf[3] = (newy);                                     \
  291.     sirven_buf[4] = 0;                                          \
  292.     sirven_buf[5] = 0;                                          \
  293.     glcompat(SIR_VEN_VIDEOCOPY, (long) sirven_buf);             \
  294. }
  295.  
  296. #endif    /* DEV_SIRIUS_H */
  297.  
  298.