📄 appthreads.h
字号:
/*
* 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.
*
*/
/*
* ======== 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
#ifdef __cplusplus
extern "C" {
#endif
// 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 360
#define CAPF_SIZE_IN_PIXELS (CAPF_WIDTH*CAPF_HEIGHT)
// Processed frame dimensions across processing channels
#define PROCF_HEIGHT (CAPF_HEIGHT)
#define PROCF_WIDTH 352
#define PROCF_SIZE_IN_PIXELS (PROCF_WIDTH*PROCF_HEIGHT)
// 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 - one for each Y, CR, and CB
#define Q1_Y_OFFSET 0
#define Q2_Y_OFFSET (OPF_WIDTH >> 1)
#define Q3_Y_OFFSET ((OPF_WIDTH * OPF_HEIGHT) >> 1)
#define Q4_Y_OFFSET ((OPF_WIDTH * OPF_HEIGHT >> 1) + (OPF_WIDTH >> 1))
#define Q1_CR_OFFSET 0
#define Q2_CR_OFFSET (Q2_Y_OFFSET >> 1)
#define Q3_CR_OFFSET ((OPF_WIDTH * OPF_HEIGHT) >> 3)
#define Q4_CR_OFFSET Q3_CR_OFFSET + (OPF_WIDTH >> 2)
#define Q1_CB_OFFSET Q1_CR_OFFSET
#define Q2_CB_OFFSET Q2_CR_OFFSET
#define Q3_CB_OFFSET Q3_CR_OFFSET
#define Q4_CB_OFFSET Q4_CR_OFFSET
// 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;
Char *bufYCRCB[3];
} ScomProcToDisp;
typedef struct placementBuff {
Char *y;
Char *cr;
Char *cb;
} placementBuff;
enum PIXELCOMPONENTS{
Y = 0,
CR,
CB,
TOTALCOMPONENTS //total types
};
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -