annotate libmpcodecs/vf_telecine.c @ 35757:b1d32b46514e

Get rid of uiVideoRender. Directly use guiInfo.Playing instead.
author ib
date Thu, 24 Jan 2013 16:06:48 +0000
parents 14913ddea4f5
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
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
19 #include <stdio.h>
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
20 #include <stdlib.h>
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
21 #include <string.h>
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
22
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 9593
diff changeset
23 #include "config.h"
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 9593
diff changeset
24 #include "mp_msg.h"
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
25
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
26 #include "img_format.h"
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
27 #include "mp_image.h"
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
28 #include "vf.h"
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
29
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 9593
diff changeset
30 #include "libvo/fastmemcpy.h"
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
31
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
32 struct vf_priv_s {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
33 int frame;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
34 };
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
35
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
36 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
37 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
38 mp_image_t *dmpi;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
39 int ret;
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
40 int w = (IMGFMT_IS_YUVP16(mpi->imgfmt) ? 2 : 1) * mpi->w;
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
41 int chroma_width = (IMGFMT_IS_YUVP16(mpi->imgfmt) ? 2 : 1) * mpi->chroma_width;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
42
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
43 vf->priv->frame = (vf->priv->frame+1)%4;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 25221
diff changeset
44
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
45 dmpi = vf_get_image(vf->next, mpi->imgfmt,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
46 MP_IMGTYPE_STATIC, MP_IMGFLAG_ACCEPT_STRIDE |
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
47 MP_IMGFLAG_PRESERVE, mpi->width, mpi->height);
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
48
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
49 ret = 0;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
50 // 0/0 1/1 2/2 2/3 3/0
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
51 switch (vf->priv->frame) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
52 case 0:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
53 my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
54 mpi->planes[0]+mpi->stride[0], w, mpi->h/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
55 dmpi->stride[0]*2, mpi->stride[0]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
56 if (mpi->flags & MP_IMGFLAG_PLANAR) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
57 my_memcpy_pic(dmpi->planes[1]+dmpi->stride[1],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
58 mpi->planes[1]+mpi->stride[1],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
59 chroma_width, mpi->chroma_height/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
60 dmpi->stride[1]*2, mpi->stride[1]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
61 my_memcpy_pic(dmpi->planes[2]+dmpi->stride[2],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
62 mpi->planes[2]+mpi->stride[2],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
63 chroma_width, mpi->chroma_height/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
64 dmpi->stride[2]*2, mpi->stride[2]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
65 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
66 ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
35180
c27aa6515169 Mark intentional fallthrough case, used for duplicating frames.
reimar
parents: 32702
diff changeset
67 /* Fallthrough */
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
68 case 1:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
69 case 2:
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
70 memcpy_pic(dmpi->planes[0], mpi->planes[0], w, mpi->h,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
71 dmpi->stride[0], mpi->stride[0]);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
72 if (mpi->flags & MP_IMGFLAG_PLANAR) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
73 memcpy_pic(dmpi->planes[1], mpi->planes[1],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
74 chroma_width, mpi->chroma_height,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
75 dmpi->stride[1], mpi->stride[1]);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
76 memcpy_pic(dmpi->planes[2], mpi->planes[2],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
77 chroma_width, mpi->chroma_height,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
78 dmpi->stride[2], mpi->stride[2]);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
79 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
80 return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) || ret;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
81 case 3:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
82 my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
83 mpi->planes[0]+mpi->stride[0], w, mpi->h/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
84 dmpi->stride[0]*2, mpi->stride[0]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
85 if (mpi->flags & MP_IMGFLAG_PLANAR) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
86 my_memcpy_pic(dmpi->planes[1]+dmpi->stride[1],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
87 mpi->planes[1]+mpi->stride[1],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
88 chroma_width, mpi->chroma_height/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
89 dmpi->stride[1]*2, mpi->stride[1]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
90 my_memcpy_pic(dmpi->planes[2]+dmpi->stride[2],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
91 mpi->planes[2]+mpi->stride[2],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
92 chroma_width, mpi->chroma_height/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
93 dmpi->stride[2]*2, mpi->stride[2]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
94 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
95 ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
96 my_memcpy_pic(dmpi->planes[0], mpi->planes[0], w, mpi->h/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
97 dmpi->stride[0]*2, mpi->stride[0]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
98 if (mpi->flags & MP_IMGFLAG_PLANAR) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
99 my_memcpy_pic(dmpi->planes[1], mpi->planes[1],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
100 chroma_width, mpi->chroma_height/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
101 dmpi->stride[1]*2, mpi->stride[1]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
102 my_memcpy_pic(dmpi->planes[2], mpi->planes[2],
35184
14913ddea4f5 Allow telecine filter to work for YUV16 formats.
cehoyos
parents: 35180
diff changeset
103 chroma_width, mpi->chroma_height/2,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
104 dmpi->stride[2]*2, mpi->stride[2]*2);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
105 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
106 return ret;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
107 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
108 return 0;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
109 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
110
24605
8a6f80593529 Disable unused query_format functions for now until they are
diego
parents: 23666
diff changeset
111 #if 0
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
112 static int query_format(struct vf_instance *vf, unsigned int fmt)
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
113 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
114 /* FIXME - figure out which other formats work */
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
115 switch (fmt) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
116 case IMGFMT_YV12:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
117 case IMGFMT_IYUV:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
118 case IMGFMT_I420:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
119 return vf_next_query_format(vf, fmt);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
120 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
121 return 0;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
122 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
123
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
124 static int config(struct vf_instance *vf,
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
125 int width, int height, int d_width, int d_height,
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
126 unsigned int flags, unsigned int outfmt)
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
127 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
128 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
129 }
24605
8a6f80593529 Disable unused query_format functions for now until they are
diego
parents: 23666
diff changeset
130 #endif
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
131
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
132 static void uninit(struct vf_instance *vf)
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
133 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
134 free(vf->priv);
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
135 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
136
30638
a7b908875c14 Rename open() vf initialization function to vf_open().
diego
parents: 30633
diff changeset
137 static int vf_open(vf_instance_t *vf, char *args)
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
138 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
139 //vf->config = config;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
140 vf->put_image = put_image;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
141 //vf->query_format = query_format;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
142 vf->uninit = uninit;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
143 vf->default_reqs = VFCAP_ACCEPT_STRIDE;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
144 vf->priv = calloc(1, sizeof(struct vf_priv_s));
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
145 vf->priv->frame = 1;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
146 if (args) sscanf(args, "%d", &vf->priv->frame);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
147 vf->priv->frame--;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
148 return 1;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
149 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
150
25221
00fff9a3b735 Make all vf_info_t structs const
reimar
parents: 24605
diff changeset
151 const vf_info_t vf_info_telecine = {
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
152 "telecine filter",
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
153 "telecine",
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
154 "Rich Felker",
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
155 "",
30638
a7b908875c14 Rename open() vf initialization function to vf_open().
diego
parents: 30633
diff changeset
156 vf_open,
9593
e9a2af584986 Add the new -vf option wich is the same as vop in reverse order.
albeu
parents: 9468
diff changeset
157 NULL
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
158 };