yadif.h 1.95 KB
Newer Older
1
/*
2
 * This file is part of Libav.
3
 *
4 5 6 7
 * Libav is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
8
 *
9
 * Libav is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
13
 *
14 15 16
 * You should have received a copy of the GNU Lesser General Public
 * License along with Libav; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 18 19 20 21
 */

#ifndef AVFILTER_YADIF_H
#define AVFILTER_YADIF_H

22
#include "libavutil/pixdesc.h"
23 24
#include "avfilter.h"

25
typedef struct YADIFContext {
26
    const AVClass *class;
27 28 29 30 31 32 33
    /**
     * 0: send 1 frame for each frame
     * 1: send 1 frame for each field
     * 2: like 0 but skips spatial interlacing check
     * 3: like 1 but skips spatial interlacing check
     */
    int mode;
34

35 36 37 38 39 40
    /**
     *  0: top field first
     *  1: bottom field first
     * -1: auto-detection
     */
    int parity;
41

42 43 44 45 46 47 48 49
    int frame_pending;

    /**
     *  0: deinterlace all frames
     *  1: only deinterlace frames marked as interlaced
     */
    int auto_enable;

50 51 52 53
    AVFrame *cur;
    AVFrame *next;
    AVFrame *prev;
    AVFrame *out;
54 55 56 57

    /**
     * Required alignment for filter_line
     */
58 59
    void (*filter_line)(void *dst,
                        void *prev, void *cur, void *next,
60
                        int w, int prefs, int mrefs, int parity, int mode);
61
    void (*filter_edges)(void *dst, void *prev, void *cur, void *next,
62
                         int w, int prefs, int mrefs, int parity, int mode);
63 64 65 66 67 68

    const AVPixFmtDescriptor *csp;
    int eof;
} YADIFContext;

void ff_yadif_init_x86(YADIFContext *yadif);
69

70
#endif /* AVFILTER_YADIF_H */