]> git.sesse.net Git - vlc/blob - modules/video_filter/deinterlace/algo_x.h
Refactored deinterlacer module
[vlc] / modules / video_filter / deinterlace / algo_x.h
1 /*****************************************************************************
2  * algo_x.h : "X" algorithm for vlc deinterlacer
3  *****************************************************************************
4  * Copyright (C) 2000-2011 the VideoLAN team
5  * $Id$
6  *
7  * Author: Sam Hocevar <sam@zoy.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef VLC_DEINTERLACE_ALGO_X_H
25 #define VLC_DEINTERLACE_ALGO_X_H 1
26
27 /* Forward declarations */
28 struct picture_t;
29
30 /*****************************************************************************
31  * Functions
32  *****************************************************************************/
33
34 /**
35  * Interpolating deinterlace filter "X".
36  *
37  * The algorithm works on a 8x8 block basic, it copies the top field
38  * and applies a process to recreate the bottom field.
39  *
40  * If a 8x8 block is classified as :
41  *   - progressive: it applies a small blend (1,6,1)
42  *   - interlaced:
43  *    * in the MMX version: we do a ME between the 2 fields, if there is a
44  *      good match we use MC to recreate the bottom field (with a small
45  *      blend (1,6,1) )
46  *    * otherwise: it recreates the bottom field by an edge oriented
47  *      interpolation.
48  *
49  * @param[in] p_pic Input frame.
50  * @param[out] p_outpic Output frame. Must be allocated by caller.
51  * @see Deinterlace()
52  */
53 void RenderX( picture_t *p_outpic, picture_t *p_pic );
54
55 #endif