annotate libmpcodecs/vf_lavcdeint.c @ 34341:946ecaf41dc1

Don't allow option gui-include in config files. This option may only be evaluated after MPlayer has called cfg_read() or a segmentation fault occurs. Prevent this by restricting its usage.
author ib
date Sun, 11 Dec 2011 14:54:56 +0000
parents 30f5e5cd3676
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30421
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
1 /*
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
2 * This file is part of MPlayer.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
3 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
5 * it under the terms of the GNU General Public License as published by
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
7 * (at your option) any later version.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
8 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
12 * GNU General Public License for more details.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
13 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
14 * You should have received a copy of the GNU General Public License along
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
17 */
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
18
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
19 #include <stdio.h>
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
20 #include <stdlib.h>
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
21 #include <string.h>
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
22 #include <inttypes.h>
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
23
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 9593
diff changeset
24 #include "config.h"
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 9593
diff changeset
25 #include "mp_msg.h"
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 9593
diff changeset
26 #include "help_mp.h"
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
27
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
28 #include "img_format.h"
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
29 #include "mp_image.h"
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
30 #include "vf.h"
33871
30f5e5cd3676 Move code for setting up libav* logging callbacks from vd_ffmpeg to a
reimar
parents: 31959
diff changeset
31 #include "av_helpers.h"
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
32 #include "libavcodec/avcodec.h"
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
33
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
34
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
35 struct vf_priv_s
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
36 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
37 int width, height;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
38 int pix_fmt;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
39 };
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
40
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
41 /* Support for avcodec's built-in deinterlacer.
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
42 * Based on vf_lavc.c
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
43 */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
44
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
45 //===========================================================================//
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
46
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
47
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
48 /* Convert mplayer's IMGFMT_* to avcodec's PIX_FMT_* for the supported
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
49 * IMGFMT's, and return -1 if the deinterlacer doesn't support
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
50 * that format (-1 because 0 is a valid PIX_FMT).
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
51 */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
52 /* The deinterlacer supports planer 4:2:0, 4:2:2, and 4:4:4 YUV */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
53 static int
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
54 imgfmt_to_pixfmt (int imgfmt)
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
55 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
56 switch(imgfmt)
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
57 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
58 /* I hope I got all the supported formats */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
59
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
60 /* 4:2:0 */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
61 case IMGFMT_YV12:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
62 case IMGFMT_I420:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
63 case IMGFMT_IYUV:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
64 return PIX_FMT_YUV420P;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
65 break;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
66
6860
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
67 #if 0
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
68 /* 4:2:2 */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
69 case IMGFMT_UYVY:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
70 case IMGFMT_UYNV:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
71 case IMGFMT_Y422:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
72 case IMGFMT_YUY2:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
73 case IMGFMT_YUNV:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
74 case IMGFMT_YVYU:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
75 case IMGFMT_Y42T:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
76 case IMGFMT_V422:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
77 case IMGFMT_V655:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
78 return PIX_FMT_YUV422P;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
79 break;
6860
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
80 #endif
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
81
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
82 /* Are there any _planar_ YUV 4:4:4 formats? */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
83
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
84 default:
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
85 return -1;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
86 }
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
87 }
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
88
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
89
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
90 static int
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
91 config (struct vf_instance *vf,
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
92 int width, int height, int d_width, int d_height,
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
93 unsigned int flags, unsigned int outfmt)
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
94 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
95 struct vf_priv_s *priv = vf->priv;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
96
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
97 priv->pix_fmt = imgfmt_to_pixfmt(outfmt);
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
98 if(priv->pix_fmt == -1)
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
99 return 0;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
100
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
101 /* The deinterlacer will fail if this is false */
8787
e280692c0878 Found another 10l :-), but the filter is still broken :-(
filon
parents: 8427
diff changeset
102 if ((width & 3) != 0 || (height & 3) != 0)
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
103 return 0;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
104
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
105 /* If we get here, the deinterlacer is guaranteed not to fail */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
106
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
107 priv->width = width;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
108 priv->height = height;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
109
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
110 return vf_next_config(vf,
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
111 width, height,
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
112 d_width, d_height,
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
113 flags, outfmt);
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
114 }
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
115
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
116 static int
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
117 put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
118 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
119 struct vf_priv_s *priv = vf->priv;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
120 mp_image_t* dmpi;
6860
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
121 AVPicture pic;
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
122 AVPicture lavc_picture;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
123
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
124 lavc_picture.data[0] = mpi->planes[0];
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
125 lavc_picture.data[1] = mpi->planes[1];
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
126 lavc_picture.data[2] = mpi->planes[2];
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
127 lavc_picture.linesize[0] = mpi->stride[0];
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
128 lavc_picture.linesize[1] = mpi->stride[1];
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
129 lavc_picture.linesize[2] = mpi->stride[2];
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
130
6860
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
131 dmpi = vf_get_image(vf->next, mpi->imgfmt,
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
132 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
133 priv->width, priv->height);
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
134
6860
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
135 pic.data[0] = dmpi->planes[0];
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
136 pic.data[1] = dmpi->planes[1];
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
137 pic.data[2] = dmpi->planes[2];
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
138 pic.linesize[0] = dmpi->stride[0];
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
139 pic.linesize[1] = dmpi->stride[1];
e575f4ee82f1 - yuv422 disabled (no IMGFMT for _planar_ 422)
arpi
parents: 6859
diff changeset
140 pic.linesize[2] = dmpi->stride[2];
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
141
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
142 if (avpicture_deinterlace(&pic, &lavc_picture,
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
143 priv->pix_fmt, priv->width, priv->height) < 0)
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
144 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
145 /* This should not happen -- see config() */
7368
a894e99c1e51 changing return type of put_image void->int
arpi
parents: 7004
diff changeset
146 return 0;
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
147 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
148
17906
20aca9baf5d8 passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents: 17523
diff changeset
149 return vf_next_put_image(vf, dmpi, pts);
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
150 }
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
151
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
152
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
153 static int
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
154 query_format (struct vf_instance *vf, unsigned int fmt)
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
155 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
156 if(imgfmt_to_pixfmt(fmt) == -1)
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
157 return 0;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
158
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
159 return vf_next_query_format(vf,fmt);
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
160 }
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
161
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
162
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26069
diff changeset
163 static int
30638
a7b908875c14 Rename open() vf initialization function to vf_open().
diego
parents: 30421
diff changeset
164 vf_open(vf_instance_t *vf, char *args)
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
165 {
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
166 /* We don't have any args */
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
167 (void) args;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
168
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
169 vf->config = config;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
170 vf->put_image = put_image;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
171 vf->query_format = query_format;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
172 vf->priv = malloc(sizeof(struct vf_priv_s));
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
173 memset(vf->priv,0,sizeof(struct vf_priv_s));
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
174
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
175 /* This may not technically be necessary just for a deinterlace,
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
176 * but it seems like a good idea.
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
177 */
31959
f957f330aa6d Introduce init_avcodec function to avoid duplicated FFmpeg initializations.
diego
parents: 30642
diff changeset
178 init_avcodec();
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
179
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
180 return 1;
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
181 }
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
182
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
183
25221
00fff9a3b735 Make all vf_info_t structs const
reimar
parents: 23373
diff changeset
184 const vf_info_t vf_info_lavcdeint = {
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
185 "libavcodec's deinterlacing filter",
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
186 "lavcdeint",
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
187 "Joe Rabinoff",
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
188 "libavcodec's internal deinterlacer, in case you don't like "
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
189 "the builtin ones (invoked with -pp or -npp)",
30638
a7b908875c14 Rename open() vf initialization function to vf_open().
diego
parents: 30421
diff changeset
190 vf_open,
9593
e9a2af584986 Add the new -vf option wich is the same as vop in reverse order.
albeu
parents: 8787
diff changeset
191 NULL
6859
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
192 };
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
193
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
194
ed26b2d781e9 new filter to use libavcodec's deinterlacer
arpi
parents:
diff changeset
195 //===========================================================================//