appthreads.h

来自「TI公司的算法标准 Framework5的源代码」· C头文件 代码 · 共 97 行

H
97
字号
/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) RF5_IEK 2.00.02 12-11-02 (swat-c19)" */
/*
 *  ======== appThreads.h ========
 *
 *  Threads-wide constants, global variables, macros, 
 *  buffers, and declaration of functions called from the rest of the app
 */
#ifndef APPTHREADS_
#define APPTHREADS_

#include <que.h>

#include "appResources.h"   // application-wide information
#include "iekc64.h"

#ifdef __cplusplus
extern "C" {
#endif

//IEKC64 driver mode constants
#define VIDEO_STANDARD          (NTSC)
#define VIDEO_INPUT_RES         (RES_NTSC_CIF)  //input resolution
#define VIDEO_OUTPUT_RES        (RES_VGA_NTSC_720X480)  //output resolution

// Captured input frame dimensions
#define CAPF_HEIGHT            240
#define CAPF_WIDTH             352
#define CAPF_SIZE_IN_PIXELS    (CAPF_WIDTH*CAPF_HEIGHT)

// Processed frame dimensions across processing channels
#define PROCF_HEIGHT           (CAPF_HEIGHT)
#define PROCF_WIDTH            (CAPF_WIDTH)
#define PROCF_SIZE_IN_PIXELS   (PROCF_WIDTH*PROCF_HEIGHT)

// RGB frame - each RGB frame contains 4 processed frames (PROCF_)
#define RGBF_HEIGHT            (CAPF_HEIGHT << 1)
#define RGBF_WIDTH             (CAPF_WIDTH << 1)
#define RGBF_SIZE_IN_PIXELS    (RGBF_WIDTH*RGBF_HEIGHT)
#define RGBF_PXLSIZE           sizeof(Uint16)

// Output frame dimensions
#define OPF_HEIGHT             480
#define OPF_WIDTH              720
#define OPF_SIZE_IN_PIXELS     (OPF_HEIGHT*OPF_WIDTH)
#define OPF_PXLSIZE            RGBF_PXLSIZE

// Quadrant offsets according to Cartesian coordinates
#define Q1OFFSET    (RGBF_WIDTH/2)
#define Q2OFFSET    0
#define Q3OFFSET    (RGBF_WIDTH * RGBF_HEIGHT / 2)
#define Q4OFFSET    ((RGBF_WIDTH * RGBF_HEIGHT / 2) + RGBF_WIDTH/2)

// shared scratch memory buckets
enum SSCRBUCKETS {
    VIDEOCAPSCRBUCKET = 0,
    VIDEOPROCSCRBUCKET,
    SCRBUCKETS // total number of shared scratch buckets
    };

// SCOM buffer descriptor
typedef struct ScomCapToProc {
    QUE_Elem elem;
    Char *bufYCRCB[3];
} ScomCapToProc;

typedef struct ScomProcToDisp {
    QUE_Elem elem;
    MdUns *bufRGB;
} ScomProcToDisp;

// control message format
typedef struct CtrlMsg {
    LgUns cmd;                       // Message code
    LgUns arg1;                      // First message argument
    LgUns arg2;                      // Second message argument
} CtrlMsg;

/*
 *  Prototypes for public functions
 */
extern Void appThreadInit();

#ifdef __cplusplus
}
#endif // extern "C" 

#endif // APPTHREADS_  


⌨️ 快捷键说明

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