annotate libmpcodecs/vf_telecine.c @ 34094:c366199552d1

Cosmetic: Adjust indent.
author ib
date Thu, 06 Oct 2011 12:22:57 +0000
parents 7af3e6f901fd
children c27aa6515169
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;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
40
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
41 vf->priv->frame = (vf->priv->frame+1)%4;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 25221
diff changeset
42
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
43 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
44 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
45 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
46
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
47 ret = 0;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
48 // 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
49 switch (vf->priv->frame) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
50 case 0:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
51 my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
52 mpi->planes[0]+mpi->stride[0], mpi->w, mpi->h/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
53 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
54 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
55 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
56 mpi->planes[1]+mpi->stride[1],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
57 mpi->chroma_width, mpi->chroma_height/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
58 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
59 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
60 mpi->planes[2]+mpi->stride[2],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
61 mpi->chroma_width, mpi->chroma_height/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
62 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
63 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
64 ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
65 case 1:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
66 case 2:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
67 memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
68 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
69 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
70 memcpy_pic(dmpi->planes[1], mpi->planes[1],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
71 mpi->chroma_width, mpi->chroma_height,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
72 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
73 memcpy_pic(dmpi->planes[2], mpi->planes[2],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
74 mpi->chroma_width, mpi->chroma_height,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
75 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
76 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
77 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
78 case 3:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
79 my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
80 mpi->planes[0]+mpi->stride[0], mpi->w, mpi->h/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
81 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
82 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
83 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
84 mpi->planes[1]+mpi->stride[1],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
85 mpi->chroma_width, mpi->chroma_height/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
86 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
87 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
88 mpi->planes[2]+mpi->stride[2],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
89 mpi->chroma_width, mpi->chroma_height/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
90 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
91 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
92 ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
93 my_memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
94 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
95 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
96 my_memcpy_pic(dmpi->planes[1], mpi->planes[1],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
97 mpi->chroma_width, mpi->chroma_height/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
98 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
99 my_memcpy_pic(dmpi->planes[2], mpi->planes[2],
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
100 mpi->chroma_width, mpi->chroma_height/2,
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
101 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
102 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
103 return ret;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
104 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
105 return 0;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
106 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
107
24605
8a6f80593529 Disable unused query_format functions for now until they are
diego
parents: 23666
diff changeset
108 #if 0
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
109 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
110 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
111 /* 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
112 switch (fmt) {
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
113 case IMGFMT_YV12:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
114 case IMGFMT_IYUV:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
115 case IMGFMT_I420:
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
116 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
117 }
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
118 return 0;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
119 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
120
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
121 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
122 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
123 unsigned int flags, unsigned int outfmt)
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
124 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
125 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
126 }
24605
8a6f80593529 Disable unused query_format functions for now until they are
diego
parents: 23666
diff changeset
127 #endif
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
128
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30638
diff changeset
129 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
130 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
131 free(vf->priv);
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
132 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
133
30638
a7b908875c14 Rename open() vf initialization function to vf_open().
diego
parents: 30633
diff changeset
134 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
135 {
32702
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
136 //vf->config = config;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
137 vf->put_image = put_image;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
138 //vf->query_format = query_format;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
139 vf->uninit = uninit;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
140 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
141 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
142 vf->priv->frame = 1;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
143 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
144 vf->priv->frame--;
7af3e6f901fd Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents: 30642
diff changeset
145 return 1;
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
146 }
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
147
25221
00fff9a3b735 Make all vf_info_t structs const
reimar
parents: 24605
diff changeset
148 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
149 "telecine filter",
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
150 "telecine",
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
151 "Rich Felker",
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
152 "",
30638
a7b908875c14 Rename open() vf initialization function to vf_open().
diego
parents: 30633
diff changeset
153 vf_open,
9593
e9a2af584986 Add the new -vf option wich is the same as vop in reverse order.
albeu
parents: 9468
diff changeset
154 NULL
9468
356963ad4784 filter for applying 3:2 telecine to 23.976 fps progressive material.
rfelker
parents:
diff changeset
155 };