Mercurial > mplayer.hg
annotate libmpcodecs/vf_softpulldown.c @ 32897:14af78beac02
Cosmetic: Format to MPlayer coding style.
author | ib |
---|---|
date | Mon, 28 Feb 2011 13:25:45 +0000 |
parents | 7af3e6f901fd |
children | 94565576f967 |
rev | line source |
---|---|
30421
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
1 /* |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
2 * This file is part of MPlayer. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
3 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
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:
25221
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:
25221
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:
25221
diff
changeset
|
7 * (at your option) any later version. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
8 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
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:
25221
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:
25221
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:
25221
diff
changeset
|
12 * GNU General Public License for more details. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
13 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
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:
25221
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:
25221
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:
25221
diff
changeset
|
17 */ |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
25221
diff
changeset
|
18 |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
19 #include <stdio.h> |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
20 #include <stdlib.h> |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
21 #include <string.h> |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
22 |
17012 | 23 #include "config.h" |
24 #include "mp_msg.h" | |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
25 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
26 #include "img_format.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
27 #include "mp_image.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
28 #include "vf.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
29 |
17012 | 30 #include "libvo/fastmemcpy.h" |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
31 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
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 state; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
34 long long in; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
35 long long out; |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
36 }; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
37 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
38 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
39 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
40 mp_image_t *dmpi; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
41 int ret = 0; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
42 int flags = mpi->fields; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
43 int state = vf->priv->state; |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
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); |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
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 vf->priv->in++; |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
50 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
51 if ((state == 0 && |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
52 !(flags & MP_IMGFIELD_TOP_FIRST)) || |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
53 (state == 1 && |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
54 flags & MP_IMGFIELD_TOP_FIRST)) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
55 mp_msg(MSGT_VFILTER, MSGL_WARN, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
56 "softpulldown: Unexpected field flags: state=%d top_field_first=%d repeat_first_field=%d\n", |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
57 state, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
58 (flags & MP_IMGFIELD_TOP_FIRST) != 0, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
59 (flags & MP_IMGFIELD_REPEAT_FIRST) != 0); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
60 state ^= 1; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
61 } |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
62 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
63 if (state == 0) { |
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, mpi, MP_NOPTS_VALUE); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
65 vf->priv->out++; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
66 if (flags & MP_IMGFIELD_REPEAT_FIRST) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
67 my_memcpy_pic(dmpi->planes[0], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
68 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
|
69 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
|
70 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
|
71 my_memcpy_pic(dmpi->planes[1], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
72 mpi->planes[1], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
73 mpi->chroma_width, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
74 mpi->chroma_height/2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
75 dmpi->stride[1]*2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
76 mpi->stride[1]*2); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
77 my_memcpy_pic(dmpi->planes[2], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
78 mpi->planes[2], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
79 mpi->chroma_width, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
80 mpi->chroma_height/2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
81 dmpi->stride[2]*2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
82 mpi->stride[2]*2); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
83 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
84 state=1; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
85 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
86 } else { |
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[0]+dmpi->stride[0], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
88 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
|
89 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
|
90 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
|
91 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
|
92 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
|
93 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
|
94 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
|
95 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
|
96 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
|
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[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
|
99 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
100 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
|
101 vf->priv->out++; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
102 if (flags & MP_IMGFIELD_REPEAT_FIRST) { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
103 ret |= vf_next_put_image(vf, mpi, MP_NOPTS_VALUE); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
104 vf->priv->out++; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
105 state=0; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
106 } else { |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
107 my_memcpy_pic(dmpi->planes[0], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
108 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
|
109 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
|
110 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
|
111 my_memcpy_pic(dmpi->planes[1], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
112 mpi->planes[1], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
113 mpi->chroma_width, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
114 mpi->chroma_height/2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
115 dmpi->stride[1]*2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
116 mpi->stride[1]*2); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
117 my_memcpy_pic(dmpi->planes[2], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
118 mpi->planes[2], |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
119 mpi->chroma_width, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
120 mpi->chroma_height/2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
121 dmpi->stride[2]*2, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
122 mpi->stride[2]*2); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
123 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
124 } |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
125 } |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
126 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
127 vf->priv->state = state; |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
128 |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
129 return ret; |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
130 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
131 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
132 static int config(struct vf_instance *vf, |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
133 int width, int height, int d_width, int d_height, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
134 unsigned int flags, unsigned int outfmt) |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
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 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
137 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
138 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
139 static void uninit(struct vf_instance *vf) |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
140 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
141 mp_msg(MSGT_VFILTER, MSGL_INFO, "softpulldown: %lld frames in, %lld frames out\n", vf->priv->in, vf->priv->out); |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
142 free(vf->priv); |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
143 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
144 |
30638
a7b908875c14
Rename open() vf initialization function to vf_open().
diego
parents:
30421
diff
changeset
|
145 static int vf_open(vf_instance_t *vf, char *args) |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
146 { |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
147 struct vf_priv_s *p; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
148 vf->config = config; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
149 vf->put_image = put_image; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
150 vf->uninit = uninit; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
151 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
|
152 vf->priv = p = 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
|
153 vf->priv->state = 0; |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
30642
diff
changeset
|
154 return 1; |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
155 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
156 |
25221 | 157 const vf_info_t vf_info_softpulldown = { |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
158 "mpeg2 soft 3:2 pulldown", |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
159 "softpulldown", |
15755 | 160 "Tobias Diedrich <ranma+mplayer@tdiedrich.de>", |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
161 "", |
30638
a7b908875c14
Rename open() vf initialization function to vf_open().
diego
parents:
30421
diff
changeset
|
162 vf_open, |
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
163 NULL |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
164 }; |