00001 /***************************************************************************** 00002 * copy.h: Fast YV12/NV12 copy 00003 ***************************************************************************** 00004 * Copyright (C) 2009 Laurent Aimar 00005 * $Id: 93d246af5a131ea004a20b0afac782d955ea74b5 $ 00006 * 00007 * Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00022 *****************************************************************************/ 00023 00024 #ifndef _VLC_AVCODEC_COPY_H 00025 #define _VLC_AVCODEC_COPY_H 1 00026 00027 typedef struct { 00028 void *base; 00029 uint8_t *buffer; 00030 size_t size; 00031 } copy_cache_t; 00032 00033 int CopyInitCache(copy_cache_t *cache, unsigned width); 00034 void CopyCleanCache(copy_cache_t *cache); 00035 00036 void CopyFromNv12(picture_t *dst, uint8_t *src[2], size_t src_pitch[2], 00037 unsigned width, unsigned height, 00038 copy_cache_t *cache); 00039 void CopyFromYv12(picture_t *dst, uint8_t *src[3], size_t src_pitch[3], 00040 unsigned width, unsigned height, 00041 copy_cache_t *cache); 00042 00043 #endif 00044
1.5.6