]> git.sesse.net Git - vlc/blob - modules/video_chroma/copy.h
mediacodec: skip prerolled frames
[vlc] / modules / video_chroma / copy.h
1 /*****************************************************************************
2  * copy.h: Fast YV12/NV12 copy
3  *****************************************************************************
4  * Copyright (C) 2009 Laurent Aimar
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir_AT_ videolan _DOT_ org>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _VLC_VIDEOCHROMA_COPY_H
25 #define _VLC_VIDEOCHROMA_COPY_H 1
26
27 typedef struct {
28 # ifdef CAN_COMPILE_SSE2
29     uint8_t *buffer;
30     size_t  size;
31 # endif
32 } copy_cache_t;
33
34 int  CopyInitCache(copy_cache_t *cache, unsigned width);
35 void CopyCleanCache(copy_cache_t *cache);
36
37 void CopyFromNv12(picture_t *dst, uint8_t *src[2], size_t src_pitch[2],
38                   unsigned width, unsigned height,
39                   copy_cache_t *cache);
40 void CopyFromYv12(picture_t *dst, uint8_t *src[3], size_t src_pitch[3],
41                   unsigned width, unsigned height,
42                   copy_cache_t *cache);
43
44 #endif