]> git.sesse.net Git - mlt/blob - src/modules/xine/yadif.h
Fix build against libav master.
[mlt] / src / modules / xine / yadif.h
1 /*
2         Yadif C-plugin for Avisynth 2.5 - Yet Another DeInterlacing Filter
3         Copyright (C)2007 Alexander G. Balakhnin aka Fizick  http://avisynth.org.ru
4     Port of YADIF filter from MPlayer
5         Copyright (C) 2006 Michael Niedermayer <michaelni@gmx.at>
6
7     This program is free software; you can redistribute it and/or modify
8         it under the terms of the GNU General Public License as published by
9         the Free Software Foundation.
10
11         This program is distributed in the hope that it will be useful,
12         but WITHOUT ANY WARRANTY; without even the implied warranty of
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14         GNU General Public License for more details.
15
16         You should have received a copy of the GNU General Public License
17         along with this program; if not, write to the Free Software
18         Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20     Avisynth_C plugin
21         Assembler optimized for GNU C compiler
22
23 */
24
25 #ifndef YADIF_H_
26 #define YADIF_H_
27
28 #include <stdint.h>
29
30 #define AVS_CPU_INTEGER_SSE 0x1
31 #define AVS_CPU_SSE2 0x2
32 #define AVS_CPU_SSSE3 0x4
33
34 typedef struct yadif_filter  {
35         int cpu; // optimization
36         int yheight;
37         int ypitch;
38         int uvpitch;
39         int ywidth;
40         int uvwidth;
41         unsigned char *ysrc;
42         unsigned char *usrc;
43         unsigned char *vsrc;
44         unsigned char *yprev;
45         unsigned char *uprev;
46         unsigned char *vprev;
47         unsigned char *ynext;
48         unsigned char *unext;
49         unsigned char *vnext;
50         unsigned char *ydest;
51         unsigned char *udest;
52         unsigned char *vdest;
53 } yadif_filter;
54
55 void filter_plane(int mode, uint8_t *dst, int dst_stride, const uint8_t *prev0, const uint8_t *cur0, const uint8_t *next0, int refs, int w, int h, int parity, int tff, int cpu);
56 void YUY2ToPlanes(const unsigned char *pSrcYUY2, int nSrcPitchYUY2, int nWidth, int nHeight,
57                                                            unsigned char * pSrcY, int srcPitchY,
58                                                            unsigned char * pSrcU,  unsigned char * pSrcV, int srcPitchUV, int cpu);
59 void YUY2FromPlanes(unsigned char *pSrcYUY2, int nSrcPitchYUY2, int nWidth, int nHeight,
60                                                           const unsigned char * pSrcY, int srcPitchY,
61                                                           const unsigned char * pSrcU, const unsigned char * pSrcV, int srcPitchUV, int cpu);
62
63 #endif