📄 vitc.h
字号:
/*------------------------------------------------------------------------
$Workfile: VITC.H $
$Date: 8/06/96 4:09p $
$Revision: 1 $
* Purpose:
*
* Notes:
*
$History: VITC.H $
*
* ***************** Version 1 *****************
* User: Stevel Date: 8/06/96 Time: 4:09p
* Created in $/601rpman/ihbmbwc
* Initialize Release.
This code and information is provided "as is" without warranty of any
kind, either expressed or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular
purpose.
1996 Analog Devices, Inc.
-------------------------------------------------------------------------*/
#ifndef VITC_H
#define VITC_H
#include "dtype.h"
typedef unsigned long FIELD;
/////////////////////////////////////////
// Left justify definition for VITC code
/////////////////////////////////////////
struct vitcfields
{
FIELD sync2bit4 :2; // VITC Bit 30-31
FIELD user_group_3 :4; // VITC Bit 26-29
FIELD sec_units :4; // VITC Bit 22-25
FIELD sync2bit3 :2; // VITC Bit 20-21
FIELD user_group_2 :4; // VITC Bit 16-19
FIELD color_frame_flag :1; // VITC Bit 15
FIELD drop_frame_flag :1; // VITC Bit 14
FIELD fnum_tens :2; // VITC Bit 12-13
FIELD sync2bit2 :2; // VITC Bit 10-11
FIELD user_group_1 :4; // VITC Bit 06-09
FIELD fnum_units :4; // VITC Bit 02-05
FIELD sync2bit1 :2; // VITC Bit 00-01
FIELD hour_units_low :2; // VITC Bit 62-63
FIELD sync2bit7 :2; // VITC Bit 60-61
FIELD user_group_6 :4; // VITC Bit 56-59
FIELD bin_group_flag :1; // VITC Bit 55
FIELD min_tens :3; // VITC Bit 52-54
FIELD sync2bit6 :2; // VITC Bit 50-51
FIELD user_group_5 :4; // VITC Bit 46-49
FIELD min_units :4; // VITC Bit 42-45
FIELD sync2bit5 :2; // VITC Bit 40-41
FIELD user_group_4 :4; // VITC Bit 36-39
FIELD field_num_525 :1; // VITC Bit 35
FIELD sec_tens :3; // VITC Bit 32-34
FIELD user_group_9 :6; // VITC Bit 90-95
FIELD crc_group :8; // VITC Bit 82-89
FIELD sync2bit9 :2; // VITC Bit 80-81
FIELD user_group_8 :4; // VITC Bit 76-79
FIELD field_num_625 :1; // VITC Bit 75
FIELD pad0 :1; // VITC Bit 74
FIELD hour_tens :2; // VITC Bit 72-73
FIELD sync2bit8 :2; // VITC Bit 70-71
FIELD user_group_7 :4; // VITC Bit 66-69
FIELD hour_units_high :2; // VITC Bit 64-65
};
typedef union vitc
{
struct vitcfields vitc_fields;
dword vitc_array[3];
} VITCTYPE;
struct moderegfields
{
byte v_i_format:4;
byte v_i_active:1;
byte v_i_master:1;
byte flag_sqpixel_625:2; /* up^ bit: 625 flag, down`' bit: sqpixel flag */
byte flag_unipolar:1;
byte flag_externdsp:1;
};
typedef struct vitcinfo
{
byte field;
byte frame;
byte seconds;
byte minutes;
byte hours;
byte compratio;
union
{
word moderegister;
struct moderegfields mrfields;
} modereg;
word hstart:10;
word vstart:10;
word hend:10;
word vend:10;
word crc;
} VITCINFO;
#define MAX_STRING 35
typedef struct modereginfo
{
char* video_interface;
char* interface_active;
char* m_s_control;
char* image_type;
char* color_range;
char* dsp_type;
word image_height;
word image_width;
} MODEREGINFO;
extern int get_vitc_info(VITCTYPE *vt, VITCINFO *v);
extern void put_vitc_info(VITCINFO *v, VITCTYPE *vt);
extern void get_modereg_info(struct moderegfields *mrf, MODEREGINFO *minfo);
extern byte get_crc_state(VITCTYPE *vt);
extern void write_crc(VITCTYPE *vt);
extern unsigned char ReadLeftJustifyBits(byte, int);
#endif /*VITC_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -