mt9t001_utils.h

来自「采用CCS3.1的开发环境」· C头文件 代码 · 共 33 行

H
33
字号
/*
 *  Copyright 2004 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.
 *  
 */

#include <evmdm642.h>

// Access even and odd pixels only
#define EVEN_PIXELS(xx) 2*xx
#define ODD_PIXELS(xx) 2*xx + 1  

// Extract the MSBs from the RGB data
#define R5(xx) ((xx & 0x00F8) >> 3) & 0x001F
#define G6(xx) ((xx & 0x00FC) >> 2) & 0x003F
#define B5(xx) ((xx & 0x00F8) >> 3) & 0x001F

// Extract the MSBs from the 10 bit RGB data
#define R5_10(xx) ((xx & 0x03E0) >> 5) & 0x001F
#define G6_10(xx) ((xx & 0x03F0) >> 4) & 0x003F
#define B5_10(xx) ((xx & 0x03E0) >> 5) & 0x001F

// Prototypes
void fillBackgroundSVGA(int numlines, int linesz, Uint16 *rawBuf, Uint8 value);

void Bayer_2_RGB565(Uint8 *srcBuf, Uint16 *outBuf, int numlinesCap, int lineszCap, int numlinesDis, int lineszDis, int scaleHoriz, int scaleVert);
void Bayer_2_RGB565_10Bit(Uint16 *srcBuf, Uint16 *outBuf, int numlinesCap, int lineszCap, int numlinesDis, int lineszDis, int scaleHoriz, int scaleVert);
void Bayer_2_RGB565_20Bit(Uint32 *srcBuf, Uint16 *outBuf, int numlinesCap, int lineszCap, int numlinesDis, int lineszDis, int scaleHoriz, int scaleVert);


⌨️ 快捷键说明

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