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

📄 tmbsl7113local.h

📁 PNX1500上视频采集芯片7113的设置源代码
💻 H
字号:
//// Copyright (C) 2003 Koninklijke Philips Electronics N.V., // All Rights Reserved. //// This source code and any compilation or derivative thereof is the // proprietary information of Koninklijke Philips Electronics N.V. // and is confidential in nature. // Under no circumstances is this software to be exposed to or placed // under an Open Source License of any type without the expressed // written permission of Koninklijke Philips Electronics N.V. // //###########################################################//! //      \file           tmbsl7113local.h // //      \brief          - // // //-----------------------------------------------------------// //      %version:       eh04#8 % //      instance:       DS_7 //      %date_created:  2004-12-02 16:38:16 % ////###########################################################//-----------------------------------------------------------------------------// FILE NAME:    tmbsl7113.h//// DESCRIPTION:  This is the API definition to handle/simulate the external//               analog video input decoder.//// DOCUMENT REF: DVP Software Coding Guidelines//               DVP Software Versioning Specification//               DVP Board Support Library Architecture Specification//// NOTES:        None//-----------------------------------------------------------------------------////-----------------------------------------------------------------------------// Standard include files://-----------------------------------------------------------------------------//#ifndef TMBSL_7113_LOCAL_H#define TMBSL_7113_LOCAL_H//-----------------------------------------------------------------------------// Project include files://-----------------------------------------------------------------------------//#include <tmbsl7113.h>                  // Video In board support library hdr#if defined(__cplusplus)extern "C" {#endif//-----------------------------------------------------------------------------// Types and defines://-----------------------------------------------------------------------------//#define SAA7113_MAX_UNITS       2#define NUM_OF_DEF_ADAPTER      2#define MAX_TT                  14#define MAX_IIC_DATA_SIZE       80// SAA7113 register values#define A_HLCK          0x40 /* OLDSB = 1. Horizontal freq locked */#define A_HLVLN         0x40 /* OLDSB = 0  Horizontal/Vertical freq locked */#define A_FIDT          0x20 /* LOW = 50Hz, HIGH = 60 Hz */#define A_RDCAP         0x01 /* OLDSB = 0. Ready for capture */#define A_CODE          0x01 /* OLDSB = 1. Colour Signal in accordance w/ selected standard */typedef enum {    ChipVersion=            0x00,       IncrementDelay=         0x01,       AnalogInputControl1=    0x02,       AnalogInputControl2=    0x03,       AnalogInputControl3=    0x04,       AnalogInputControl4=    0x05,       HorzSyncStart=          0x06,       HorzSyncStop=           0x07,       SyncControl=            0x08,       LuminanceControl=       0x09,       LuminanceBrightness=    0x0A,       LuminanceContrast=      0x0B,       ChromaSaturation=       0x0C,       ChromaHueControl=       0x0D,       ChromaControl=          0x0E,       ChromaGainControl=      0x0F,       FormatDelayControl=     0x10,       OutputControl1=         0x11,       OutputControl2=         0x12,       OutputControl3=         0x13,       VGateStart=             0x15,       VGateStop=              0x16,       VGateMSB=               0x17,       StatusByte=             0x1F,       AC1=                    0x40,       LCR2=                   0x41,       LCR3=                   0x42,       LCR4=                   0x43,       LCR5=                   0x44,       LCR6=                   0x45,       LCR7=                   0x46,       LCR8=                   0x47,       LCR9=                   0x48,       LCR10=                  0x49,       LCR11=                  0x4A,       LCR12=                  0x4B,       LCR13=                  0x4C,       LCR14=                  0x4D,       LCR15=                  0x4E,       LCR16=                  0x4F,       LCR17=                  0x50,       LCR18=                  0x51,       LCR19=                  0x52,       LCR20=                  0x53,       LCR21=                  0x54,       LCR22=                  0x55,       LCR23=                  0x56,       LCR24=                  0x57,       FC=                     0x58,       HOFF=                   0x59,       VOFF=                   0x5A,       HVOFF=                  0x5B,       DID=                    0x5D,       SDID=                   0x5E,       DR=                     0x60,       LN1=                    0x61,       LN2=                    0x62    } decoderRegs_t;typedef struct {    Int               nBitMask;    Int               nNibble;} viDataServiceMapping_t;// Video Decoder Instance structtypedef struct {    Bool                     init;              // True:instance is initialized    tmbslAvi_t               config;            // unit configuration    tmInstance_t             iicInstance;       // IIC instance in use    tmVideoAnalogStandard_t  curVideoStandard;  // current video standard    tmVideoAnalogAdapter_t   curAdapterType;    // current adapter type    UInt32                   curAdapterIndex;   // current adapter index    UInt32                   curDecInput;       // current mode select value    UInt32                   curBrightness;     // Current brightness    UInt32                   curContrast;       // Current contrast    UInt32                   curSaturation;     // Current saturation    UInt32                   curHue;            // Current hue    tmPowerState_t           curPowerState;     // Current Power State} decoderStruct_t;//-----------------------------------------------------------------------------// Global data://-----------------------------------------------------------------------------//static UInt8 saa7113_defRegs[] = {     IncrementDelay,        0x08,     AnalogInputControl1,   0xC1,     AnalogInputControl2,   0x13,     AnalogInputControl3,   0x00,     AnalogInputControl4,   0x00,     HorzSyncStart,         0xe9,     HorzSyncStop,          0x0b,     SyncControl,           0xa8,     LuminanceControl,      0x01,     LuminanceBrightness,   0x80,     LuminanceContrast,     0x47,     ChromaSaturation,      0x40,     ChromaHueControl,      0x00,     ChromaControl,         0x01,     ChromaGainControl,     0x3f,     FormatDelayControl,    0x00,     OutputControl1,        0x0C,     OutputControl2,        0x11,     OutputControl3,        0x00,     VGateStart,            0x00,     VGateStop,             0x00,     VGateMSB,              0x00,     StatusByte,            0x00,     AC1,                   0x02,     LCR2,                  0xFF,     LCR3,                  0xFF,     LCR4,                  0xFF,     LCR5,                  0xFF,     LCR6,                  0xFF,     LCR7,                  0xFF,     LCR8,                  0xFF,     LCR9,                  0xFF,     LCR10,                 0xFF,     LCR11,                 0xFF,     LCR12,                 0xFF,     LCR13,                 0xFF,     LCR14,                 0xFF,     LCR15,                 0xFF,     LCR16,                 0xFF,     LCR17,                 0xFF,     LCR18,                 0xFF,     LCR19,                 0xFF,     LCR20,                 0xFF,     LCR21,                 0xFF,     LCR22,                 0xFF,     LCR23,                 0xFF,     LCR24,                 0xFF,     FC,                    0x00,     HOFF,                  0x54,     VOFF,                  0x0A,     HVOFF,                 0x03,     DID,                   0x00,     SDID,                  0x13,     DR,                    0x00,     LN1,                   0x0c,     LN2,                   0x2F};static UInt             m_nNumVBILines;static UInt             m_nStartVBILine;static tmErrorCode_t  lastI2cError = TM_OK;static viDataServiceMapping_t Convert7113TT[MAX_TT] ={    {vdsEuroTeleText,       0x0},    {vdsEuroClosedCaption,  0x1},    {vdsVPS,                0x2},    {vdsWSS,                0x3},    {vdsUSTeleText,         0x4},    {vdsUSClosedCaption,    0x5},    {vdsUpsampledRaw,       0x7},    {vdsTeleText,           0x8},    {vdsVITC_EBU,           0x9},    {vdsVITC_SMPTE,         0xA},    {vdsUSNABTS,            0xC},    {vdsMoji,               0xD},    {vdsJapFormatSwitch,    0xE},    {vdsNone,               0xF},};static tmbslAviAdapterEntry_t gAdapterTable[SAA7113_MAX_UNITS];static decoderStruct_t        gDecInstance[SAA7113_MAX_UNITS] = {    {        False,                      // True:instance is initialized        {0,0,0,0,0,0,0,0,0,Null},   // configuration structure        0,                          // Decoder's I2C base address         vasPAL,                     // default video standard        vaaSvideo,                  // default adapter type        0,                          // default adapter index        0,                          // default mode select value        0x80,                       // default brightness        0x40,                       // default contrast        0x40,                       // default saturation        0,                          // default hue        tmPowerOff                  // default power state    },    {        False,                      // True:instance is initialized        {0,0,0,0,0,0,0,0,0,Null},   // configuration structure        0,                          // Decoder's I2C base address         vasPAL,                     // default video standard        vaaSvideo,                  // default adapter type        0,                          // default adapter index        0,                          // default mode select value        0x80,                       // default brightness        0x40,                       // default contrast        0x40,                       // default saturation        0,                          // default hue        tmPowerOff                  // default power state    }};  #if defined(__cplusplus)}#endif#endif

⌨️ 快捷键说明

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