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

📄 color.h

📁 Window Mobile Capture with DirectDraw
💻 H
字号:
/*-
 * Copyright (C) 2002
 *  Robert Jiang(XIAOHUA JIANG). All rights reserved.
 * All or some portions of this file are derived from material lisenced
 * to Robert Jiang(XIAOHUA JIANG).
 */
#ifndef __COLOR_H__
#define __COLOR_H__

#if 0 // for portability
#include "types.h"
#else
typedef int int32_t;
#define xmalloc malloc
#define xfree free
#endif

typedef unsigned char sample_t;

typedef enum {
	CHROM_MONO,	// monochrom
	CHROM_422,
	CHROM_420,  // YV12
	CHROM_444
} ChromFormat;

struct color_cvt {
	ChromFormat	chrom_format;
	int32_t		*table;
	sample_t	*buffer;		/* temporal buffer */
	int32_t		width;
	int32_t		height;
	int		pixel_size;
};

void rgb_ycc_init(struct color_cvt *ccvt, ChromFormat chrom, int width, int height, int bpp);
void rgb_ycc_free(struct color_cvt *ccvt);
void rgb_ycc_convert(const struct color_cvt *ccvt, const sample_t *in, sample_t *out);

void ycc_rgb_init(struct color_cvt *ccvt, ChromFormat chrom, int width, int height, int bpp);
void ycc_rgb_free(struct color_cvt *ccvt);
void ycc_rgb_convert(const struct color_cvt *ccvt, const sample_t *in, sample_t *out);

#endif // __COLOR_H__

⌨️ 快捷键说明

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