color.h.bak

来自「Window Mobile Capture with DirectDraw」· BAK 代码 · 共 39 行

BAK
39
字号
/*-
 * 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__

#include "types.h"

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 + =
减小字号Ctrl + -
显示快捷键?