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>
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.
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.
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.
21 Assembler optimized for GNU C compiler
30 #define AVS_CPU_INTEGER_SSE 0x1
31 #define AVS_CPU_SSE2 0x2
32 #define AVS_CPU_SSSE3 0x4
34 typedef struct yadif_filter {
35 int cpu; // optimization
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);