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

📄 vmirror_u16.c

📁 LINUX下的ov2640驱动程序
💻 C
字号:
/* * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. *//* * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License * Version 2 or later at the following locations: * * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html */#include <linux/module.h>#include <linux/string.h>#include "opl.h"int opl_vmirror_u16(const u8 * src, int src_line_stride, int width, int height,		    u8 * dst, int dst_line_stride){	const u8 *src_row_addr;	u8 *dst_row_addr;	int i;	if (!src || !dst)		return OPLERR_NULL_PTR;	if (width == 0 || height == 0 || src_line_stride == 0	    || dst_line_stride == 0)		return OPLERR_BAD_ARG;	src_row_addr = src;	dst_row_addr = dst + (height - 1) * dst_line_stride;	/* Loop over all rows */	for (i = 0; i < height; i++) {		/* memcpy each row */		memcpy(dst_row_addr, src_row_addr, BYTES_PER_PIXEL * width);		src_row_addr += src_line_stride;		dst_row_addr -= dst_line_stride;	}	return OPLERR_SUCCESS;}EXPORT_SYMBOL(opl_vmirror_u16);

⌨️ 快捷键说明

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